aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates/qquickpopuppositioner.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/quicktemplates/qquickpopuppositioner.cpp')
-rw-r--r--src/quicktemplates/qquickpopuppositioner.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/quicktemplates/qquickpopuppositioner.cpp b/src/quicktemplates/qquickpopuppositioner.cpp
index aecbc7373c..9628685e06 100644
--- a/src/quicktemplates/qquickpopuppositioner.cpp
+++ b/src/quicktemplates/qquickpopuppositioner.cpp
@@ -102,6 +102,11 @@ void QQuickPopupPositioner::reposition()
// m_parentItem is the parent that the popup should open in,
// and popupItem()->parentItem() is the overlay, so the mapToItem() calls below
// effectively map the rect to scene coordinates.
+
+ // Animations can cause reposition() to get called when m_parentItem no longer has a window.
+ if (!m_parentItem->window())
+ return;
+
if (centerInParent) {
if (centerInParent != parentItem() && !centerInOverlay) {
qmlWarning(m_popup) << "Popup can only be centered within its immediate parent or Overlay.overlay";