Commit f04f09e1 authored by Thomas Hartmann's avatar Thomas Hartmann Committed by Tim Jenssen

QmlDesigner: Crash fix

Throwing for an invalid model node does not make much sense.
I expected it returning false and that it what it does now.

Change-Id: I5c8c1a771e95a39bdb9ab7c30b4e94957464ffc1
Reviewed-by: Tim Jenssen's avatarTim Jenssen <tim.jenssen@qt.io>
parent 71007df8
......@@ -870,10 +870,9 @@ bool ModelNode::isSelected() const
*/
bool ModelNode::isRootNode() const
{
if (!isValid()) {
Q_ASSERT_X(isValid(), Q_FUNC_INFO, "model node is invalid");
throw InvalidModelNodeException(__LINE__, __FUNCTION__, __FILE__);
}
if (!isValid())
return false;
return view()->rootModelNode() == *this;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment