forked from qt-creator/qt-creator
QmlDesigner: crash fix
ModelNode::isComponent() is throwing an exception if the node is not valid. Change-Id: I4b34b9a583108923d584a73585f3001df68a741d Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
This commit is contained in:
@@ -99,7 +99,8 @@ bool selectionHasSameParent(const SelectionContext &selectionState)
|
|||||||
|
|
||||||
bool selectionIsComponent(const SelectionContext &selectionState)
|
bool selectionIsComponent(const SelectionContext &selectionState)
|
||||||
{
|
{
|
||||||
return selectionState.currentSingleSelectedNode().isComponent();
|
return selectionState.currentSingleSelectedNode().isValid()
|
||||||
|
&& selectionState.currentSingleSelectedNode().isComponent();
|
||||||
}
|
}
|
||||||
|
|
||||||
} //SelectionStateFunctors
|
} //SelectionStateFunctors
|
||||||
|
Reference in New Issue
Block a user