diff options
author | Nick Ratelle <nratelle@qnx.com> | 2012-01-05 21:48:58 (GMT) |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-02-08 22:32:47 (GMT) |
commit | 95a857c2d3212c0a19aefd11ff960df56d413acc (patch) | |
tree | c6f2e60176eea1b48611c04ddd9278fccd626dc1 /src/corelib | |
parent | 2906a96486d079b00bf4c640f84833b8194c4fee (diff) | |
download | Qt-95a857c2d3212c0a19aefd11ff960df56d413acc.zip Qt-95a857c2d3212c0a19aefd11ff960df56d413acc.tar.gz Qt-95a857c2d3212c0a19aefd11ff960df56d413acc.tar.bz2 |
Fixed null pointer dereference in QUnifiedTimer
Change-Id: I8b7ab19a98e2920fc020043088c32d073aa1d60d
Reviewed-by: David Faure <david.faure@kdab.com>
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/animation/qabstractanimation.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/corelib/animation/qabstractanimation.cpp b/src/corelib/animation/qabstractanimation.cpp index 8fa4707..7c2d690 100644 --- a/src/corelib/animation/qabstractanimation.cpp +++ b/src/corelib/animation/qabstractanimation.cpp @@ -392,13 +392,16 @@ int QUnifiedTimer::closestPauseAnimationTimeToFinish() void QUnifiedTimer::installAnimationDriver(QAnimationDriver *d) { - if (driver->isRunning()) { - qWarning("QUnifiedTimer: Cannot change animation driver while animations are running"); - return; - } + if (driver) { + + if (driver->isRunning()) { + qWarning("QUnifiedTimer: Cannot change animation driver while animations are running"); + return; + } - if (driver && driver != &defaultDriver) - delete driver; + if (driver != &defaultDriver) + delete driver; + } driver = d; } |