diff --git a/src/plugins/qmldesigner/components/toolbar/toolbarbackend.cpp b/src/plugins/qmldesigner/components/toolbar/toolbarbackend.cpp index cf91e2c1fcf..33031032f6e 100644 --- a/src/plugins/qmldesigner/components/toolbar/toolbarbackend.cpp +++ b/src/plugins/qmldesigner/components/toolbar/toolbarbackend.cpp @@ -354,7 +354,8 @@ bool ToolBarBackend::isDesignModeEnabled() const int ToolBarBackend::currentStyle() const { - QTC_ASSERT(currentDesignDocument(), return 0); + if (!currentDesignDocument()) + return 0; auto view = currentDesignDocument()->rewriterView();