summaryrefslogtreecommitdiffstats
path: root/src/gui/styles/qstylesheetstyle.cpp
diff options
context:
space:
mode:
authorMarkus Goetz <Markus.Goetz@nokia.com>2009-05-04 12:29:39 (GMT)
committerMarkus Goetz <Markus.Goetz@nokia.com>2009-05-06 14:53:38 (GMT)
commit2eb0312c96ab828809158802d4cb7e0980227389 (patch)
tree1e03da3f7b64f761b63cf72a5c5e1f5300cb467b /src/gui/styles/qstylesheetstyle.cpp
parent980256ac1012f236a600d2a613229c50258a1ed8 (diff)
downloadQt-2eb0312c96ab828809158802d4cb7e0980227389.zip
Qt-2eb0312c96ab828809158802d4cb7e0980227389.tar.gz
Qt-2eb0312c96ab828809158802d4cb7e0980227389.tar.bz2
Fix crash in QWebView when application has a style sheet
Task: 252796 Rev-By: Tor Arne
Diffstat (limited to 'src/gui/styles/qstylesheetstyle.cpp')
-rw-r--r--src/gui/styles/qstylesheetstyle.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/styles/qstylesheetstyle.cpp b/src/gui/styles/qstylesheetstyle.cpp
index ebddfd5..dcc11b8 100644
--- a/src/gui/styles/qstylesheetstyle.cpp
+++ b/src/gui/styles/qstylesheetstyle.cpp
@@ -4758,7 +4758,7 @@ QSize QStyleSheetStyle::sizeFromContents(ContentsType ct, const QStyleOption *op
case CT_LineEdit:
#ifndef QT_NO_SPINBOX
// ### hopelessly broken QAbstractSpinBox (part 2)
- if (QAbstractSpinBox *spinBox = qobject_cast<QAbstractSpinBox *>(w->parentWidget())) {
+ if (QAbstractSpinBox *spinBox = qobject_cast<QAbstractSpinBox *>(w ? w->parentWidget() : 0)) {
QRenderRule rule = renderRule(spinBox, opt);
if (rule.hasBox() || !rule.hasNativeBorder())
return csz;