From 2eb0312c96ab828809158802d4cb7e0980227389 Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Mon, 4 May 2009 14:29:39 +0200 Subject: Fix crash in QWebView when application has a style sheet Task: 252796 Rev-By: Tor Arne --- src/gui/styles/qstylesheetstyle.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(w->parentWidget())) { + if (QAbstractSpinBox *spinBox = qobject_cast(w ? w->parentWidget() : 0)) { QRenderRule rule = renderRule(spinBox, opt); if (rule.hasBox() || !rule.hasNativeBorder()) return csz; -- cgit v0.12