summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@digia.com>2013-02-20 12:53:41 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-02-20 13:00:22 +0100
commitc90626f189d5a3942d1e240d30121a2bdafde454 (patch)
tree47efabd3bf0986616a22b3c20a37f667f8fcd914 /src
parentfcef9b42520c55f6482e4a6c86bd55246a85e88b (diff)
QMacStyle::drawControl(CE_ProgressBar): add missing null pointer check
Do not spin off progress bar animations if QStyleOption::styleObject is not set. Task-number: QTBUG-29748 Change-Id: I4e17a4892e82cae48250afa7a270b15ca5730f46 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/widgets/styles/qmacstyle_mac.mm2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/styles/qmacstyle_mac.mm b/src/widgets/styles/qmacstyle_mac.mm
index bb9230804c..5d83804d51 100644
--- a/src/widgets/styles/qmacstyle_mac.mm
+++ b/src/widgets/styles/qmacstyle_mac.mm
@@ -4259,7 +4259,7 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter
if (isIndeterminate || tdi.value < tdi.max) {
if (QProgressStyleAnimation *animation = qobject_cast<QProgressStyleAnimation*>(d->animation(opt->styleObject)))
tdi.trackInfo.progress.phase = animation->animationStep();
- else
+ else if (opt->styleObject)
d->startAnimation(new QProgressStyleAnimation(d->animateSpeed(QMacStylePrivate::AquaProgressBar), opt->styleObject));
} else {
d->stopAnimation(opt->styleObject);