QmlDesigner: Remove QTC_ASSERT

This crashes if edit3DWidget() is null and we check below.

Change-Id: If993b73461fb442fb6d668ba9fc15c46ea763a11
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Thomas Hartmann
2022-07-01 09:36:05 +02:00
parent 8a83938886
commit b5a34902d0

View File

@@ -210,8 +210,6 @@ void Edit3DView::modelAttached(Model *model)
void Edit3DView::modelAboutToBeDetached(Model *model) void Edit3DView::modelAboutToBeDetached(Model *model)
{ {
QTC_ASSERT(edit3DWidget()->canvas(), return);
// Hide the canvas when model is detached (i.e. changing documents) // Hide the canvas when model is detached (i.e. changing documents)
if (edit3DWidget() && edit3DWidget()->canvas()) { if (edit3DWidget() && edit3DWidget()->canvas()) {
m_canvasCache.insert(model, edit3DWidget()->canvas()->renderImage()); m_canvasCache.insert(model, edit3DWidget()->canvas()->renderImage());