forked from qt-creator/qt-creator
QmlDesigner: Fix Q_ASSERT
instanceForObject(item) will assert if the instance does not exist. We already do check if the instance is actually valid. Change-Id: I0b0ef37d7db3d1e4195504ee8e5f92243bb26d83 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
This commit is contained in:
@@ -400,7 +400,9 @@ QImage Qt5NodeInstanceServer::grabItem([[maybe_unused]] QQuickItem *item)
|
|||||||
if (!isLayerEnabled(pItem))
|
if (!isLayerEnabled(pItem))
|
||||||
pItem->refFromEffectItem(false);
|
pItem->refFromEffectItem(false);
|
||||||
|
|
||||||
ServerNodeInstance instance = instanceForObject(item);
|
ServerNodeInstance instance;
|
||||||
|
if (hasInstanceForObject(item))
|
||||||
|
instance = instanceForObject(item);
|
||||||
|
|
||||||
const bool rootIs3DObject = rootIsRenderable3DObject();
|
const bool rootIs3DObject = rootIsRenderable3DObject();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user