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-08 08:02:00 +0000
commit2ededacdde179357eb686901202789bbee35771a (patch)
tree998611f87ab659df99561877761178c73307e7ed
parentb067e607f1cfd5bee94710d6a6a7c2fa048e9b23 (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> (cherry picked from commit 10095542d16fc9f5b2c585abf72fe00be9debff3)
-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 50fb7090d1..02c6f8cbbe 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()