summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorRené J.V. Bertin <rjvbertin@gmail.com>2014-10-06 17:08:00 (GMT)
committerShawn Rutledge <shawn.rutledge@digia.com>2015-04-21 13:00:04 (GMT)
commitec701869f5c7f70608e71331223b22454c3a3e4c (patch)
treeac1caa7b2c4110abb56a632e82f2c28bc9055e17 /src/gui
parent4bc86c34e2d2f4c1d1c1002c94f857d9adc51194 (diff)
downloadQt-ec701869f5c7f70608e71331223b22454c3a3e4c.zip
Qt-ec701869f5c7f70608e71331223b22454c3a3e4c.tar.gz
Qt-ec701869f5c7f70608e71331223b22454c3a3e4c.tar.bz2
OSX: avoid crash in invalidateBuffer_resizeHelper on parentless widget
KDE4 has a KMenu::addTitle function that adds a distinctive item to a menu, as the predecessor to Qt5's QMenu::addSection. On OS X this function leads to a null pointer access because invalidateBuffer_resizeHelper is called on a parentless widget. This patch filters out such widgets. Task-number: QTBUG-41716 Change-Id: I8f62a14d201ce44e038ceff87ee5db98277f1b87 Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/kernel/qwidget_mac.mm2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm
index 6e1672b..5730020 100644
--- a/src/gui/kernel/qwidget_mac.mm
+++ b/src/gui/kernel/qwidget_mac.mm
@@ -4619,7 +4619,7 @@ void QWidgetPrivate::setGeometry_sys_helper(int x, int y, int w, int h, bool isM
setWSGeometry(false, oldRect);
- if (isResize && QApplicationPrivate::graphicsSystem())
+ if (isResize && q->parentWidget() && QApplicationPrivate::graphicsSystem())
invalidateBuffer_resizeHelper(oldp, olds);
}