diff options
author | Thomas Hartmann <thomas.hartmann@qt.io> | 2022-08-23 17:27:30 +0200 |
---|---|---|
committer | Tim Jenssen <tim.jenssen@qt.io> | 2022-08-23 17:21:30 +0000 |
commit | daabcbbf7393a5c9eccebc6aa4495e1776d427f9 (patch) | |
tree | 291dd839a048c3495c402b5254586dffe722bdc0 | |
parent | 8310a2f0a9a4d15af589da948928181630d8f4bd (diff) | |
download | qt-creator-daabcbbf7393a5c9eccebc6aa4495e1776d427f9.tar.gz |
QmlDesigner: Fix crash
isBlocked seems to be called in rare cases if the model is null.
Change-Id: Ie8fa6007a0891f4204c35600084025ca52f079e9
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
-rw-r--r-- | src/plugins/qmldesigner/components/propertyeditor/propertyeditorcontextobject.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorcontextobject.h b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorcontextobject.h index f5a2224c8b..05ebe47ec2 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorcontextobject.h +++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorcontextobject.h @@ -28,12 +28,14 @@ #include <model.h> #include <modelnode.h> -#include <QObject> -#include <QUrl> -#include <QQmlPropertyMap> -#include <QQmlComponent> #include <QColor> +#include <QObject> #include <QPoint> +#include <QPointer> +#include <QQmlComponent> +#include <QQmlPropertyMap> +#include <QUrl> + #include <QMouseEvent> namespace QmlDesigner { @@ -183,7 +185,7 @@ private: QPoint m_lastPos; - Model *m_model = nullptr; + QPointer<Model> m_model; bool m_aliasExport = false; |