aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquickdrawer.cpp
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2016-08-18 16:50:27 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2016-08-19 14:26:36 +0000
commit62646977131f0bd591d9a0dc077f44386f10ad17 (patch)
tree3b3e4a36b81342316c78e42842e86bfdc60cbc6b /src/quicktemplates2/qquickdrawer.cpp
parent02d1126499c2efd58fdcdde970d0713940230c58 (diff)
QQuickPopup: do not attempt to execute transitions without a window
A parentless/windowless popup item is not associated to a QML engine. Accessing transitions calls qmlExecuteDeferred(), which leads to a crash. This can happen in auto tests with the shared tooltip during destruction. Change-Id: I9a258b2df6b87fce7833e358f17b1910934212c2 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquickdrawer.cpp')
-rw-r--r--src/quicktemplates2/qquickdrawer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quicktemplates2/qquickdrawer.cpp b/src/quicktemplates2/qquickdrawer.cpp
index 45719bf9..056a636f 100644
--- a/src/quicktemplates2/qquickdrawer.cpp
+++ b/src/quicktemplates2/qquickdrawer.cpp
@@ -328,7 +328,7 @@ bool QQuickDrawerPrivate::handleMouseReleaseEvent(QQuickItem *item, QMouseEvent
static QList<QQuickStateAction> prepareTransition(QQuickDrawer *drawer, QQuickTransition *transition, qreal to)
{
QList<QQuickStateAction> actions;
- if (!transition)
+ if (!transition || !QQuickPopupPrivate::get(drawer)->window)
return actions;
qmlExecuteDeferred(transition);