diff options
author | Markus Goetz <Markus.Goetz@nokia.com> | 2009-05-04 12:29:39 (GMT) |
---|---|---|
committer | Markus Goetz <Markus.Goetz@nokia.com> | 2009-05-06 15:40:25 (GMT) |
commit | 9f7e8dcd408f8a082d6b8355c78c692d71becbb8 (patch) | |
tree | 9a81c66258b758f08dc254579dec3ef0246b4c0f | |
parent | 67c2b69d45eb43078b7e4193ced6cd513602483c (diff) | |
download | Qt-9f7e8dcd408f8a082d6b8355c78c692d71becbb8.zip Qt-9f7e8dcd408f8a082d6b8355c78c692d71becbb8.tar.gz Qt-9f7e8dcd408f8a082d6b8355c78c692d71becbb8.tar.bz2 |
Fix crash in QWebView when application has a style sheet
Task: 252796
Rev-By: Tor Arne
-rw-r--r-- | src/gui/styles/qstylesheetstyle.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/styles/qstylesheetstyle.cpp b/src/gui/styles/qstylesheetstyle.cpp index 058660e..714b8c5 100644 --- a/src/gui/styles/qstylesheetstyle.cpp +++ b/src/gui/styles/qstylesheetstyle.cpp @@ -4926,7 +4926,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; |