summaryrefslogtreecommitdiffstats
path: root/tools/designer/src
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2010-01-21 07:35:49 (GMT)
committerFriedemann Kleint <Friedemann.Kleint@nokia.com>2010-01-21 07:35:49 (GMT)
commitf6f4e2b73391dcc24382583f9c52f09bb4ced37a (patch)
tree45cc735919d070d6939a03a2cd5d08bcb585e2ea /tools/designer/src
parenta5834ce3f97c1a8e01f1c7cad51ff02d21a20c68 (diff)
downloadQt-f6f4e2b73391dcc24382583f9c52f09bb4ced37a.zip
Qt-f6f4e2b73391dcc24382583f9c52f09bb4ced37a.tar.gz
Qt-f6f4e2b73391dcc24382583f9c52f09bb4ced37a.tar.bz2
Designer: Fixed a crash when previewing in a non-existent style.
Task-number: QTBUG-7432 Reviewed-by: Jarek Kobus <jkobus@trolltech.com>
Diffstat (limited to 'tools/designer/src')
-rw-r--r--tools/designer/src/lib/shared/widgetfactory.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/designer/src/lib/shared/widgetfactory.cpp b/tools/designer/src/lib/shared/widgetfactory.cpp
index eda551d..c7b13a1 100644
--- a/tools/designer/src/lib/shared/widgetfactory.cpp
+++ b/tools/designer/src/lib/shared/widgetfactory.cpp
@@ -774,6 +774,8 @@ void WidgetFactory::applyStyleTopLevel(const QString &styleName, QWidget *w)
void WidgetFactory::applyStyleToTopLevel(QStyle *style, QWidget *widget)
{
+ if (!style)
+ return;
const QPalette standardPalette = style->standardPalette();
if (widget->style() == style && widget->palette() == standardPalette)
return;