aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Smolko <andrewsmolko@gmail.com>2018-10-03 13:57:29 +0300
committerShawn Rutledge <shawn.rutledge@qt.io>2018-10-05 18:20:40 +0000
commit10095542d16fc9f5b2c585abf72fe00be9debff3 (patch)
treee19d825ad1e466fcaefa378c62fb1446c8b3f497
parent9cb13a422e11b6523aa52cd71cf073c8469c20d6 (diff)
Fix crash in QQuickAnimatorProxyJob::sceneGraphInitialized()
Check for null pointer to controller. Fixes: QTBUG-64402 Change-Id: Ic84bdc9c5cde0e65da436e1c85b40eaf6e3ed77a Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
-rw-r--r--src/quick/util/qquickanimatorjob.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/quick/util/qquickanimatorjob.cpp b/src/quick/util/qquickanimatorjob.cpp
index 6574f8f67e..03be78ab15 100644
--- a/src/quick/util/qquickanimatorjob.cpp
+++ b/src/quick/util/qquickanimatorjob.cpp
@@ -217,8 +217,10 @@ void QQuickAnimatorProxyJob::setWindow(QQuickWindow *window)
void QQuickAnimatorProxyJob::sceneGraphInitialized()
{
- disconnect(m_controller->window(), &QQuickWindow::sceneGraphInitialized, this, &QQuickAnimatorProxyJob::sceneGraphInitialized);
- readyToAnimate();
+ if (m_controller) {
+ disconnect(m_controller->window(), &QQuickWindow::sceneGraphInitialized, this, &QQuickAnimatorProxyJob::sceneGraphInitialized);
+ readyToAnimate();
+ }
}
void QQuickAnimatorProxyJob::readyToAnimate()