diff options
author | Bernd Weimer <bernd.weimer@pelagicore.com> | 2020-02-26 18:18:08 +0100 |
---|---|---|
committer | Bernd Weimer <bernd.weimer@pelagicore.com> | 2020-03-02 02:03:08 +0100 |
commit | 4491e824ff8a5a1d3b13631ea483bdff51429f94 (patch) | |
tree | b758f135ca1f199e82d570f279a27d74c73e9eeb | |
parent | 83c08c3965577b58f37a82ee604d2b73ceafcd3a (diff) |
Prevent QML backtrace when engine has been deleted
Cherry-picked from 5.13: 377b597
Change-Id: I0926e68e411c4285d70144b2db4b6a848b39a784
Reviewed-by: Robert Griebl <robert.griebl@qt.io>
-rw-r--r-- | src/common-lib/crashhandler.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/common-lib/crashhandler.cpp b/src/common-lib/crashhandler.cpp index 6efbcf9a..6bcaf586 100644 --- a/src/common-lib/crashhandler.cpp +++ b/src/common-lib/crashhandler.cpp @@ -62,6 +62,7 @@ QT_END_NAMESPACE_AM #else #if defined(QT_QML_LIB) +# include <QPointer> # include <QQmlEngine> # include <QtQml/private/qv4engine_p.h> # include <QtQml/private/qv8engine_p.h> @@ -113,7 +114,7 @@ void CrashHandler::setCrashActionConfiguration(const QVariantMap &config) } #if defined(QT_QML_LIB) -static QQmlEngine *qmlEngine; +static QPointer<QQmlEngine> qmlEngine; void CrashHandler::setQmlEngine(QQmlEngine *engine) { |