diff options
author | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2010-01-21 07:35:49 (GMT) |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2010-01-21 07:35:49 (GMT) |
commit | f6f4e2b73391dcc24382583f9c52f09bb4ced37a (patch) | |
tree | 45cc735919d070d6939a03a2cd5d08bcb585e2ea /tools/designer/src | |
parent | a5834ce3f97c1a8e01f1c7cad51ff02d21a20c68 (diff) | |
download | Qt-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.cpp | 2 |
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; |