forked from qt-creator/qt-creator
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 <tim.jenssen@qt.io>
This commit is contained in:
committed by
Tim Jenssen
parent
71007df8fd
commit
f04f09e17c
@@ -870,10 +870,9 @@ bool ModelNode::isSelected() const
|
|||||||
*/
|
*/
|
||||||
bool ModelNode::isRootNode() const
|
bool ModelNode::isRootNode() const
|
||||||
{
|
{
|
||||||
if (!isValid()) {
|
if (!isValid())
|
||||||
Q_ASSERT_X(isValid(), Q_FUNC_INFO, "model node is invalid");
|
return false;
|
||||||
throw InvalidModelNodeException(__LINE__, __FUNCTION__, __FILE__);
|
|
||||||
}
|
|
||||||
return view()->rootModelNode() == *this;
|
return view()->rootModelNode() == *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user