From f6f4e2b73391dcc24382583f9c52f09bb4ced37a Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 21 Jan 2010 08:35:49 +0100 Subject: Designer: Fixed a crash when previewing in a non-existent style. Task-number: QTBUG-7432 Reviewed-by: Jarek Kobus --- tools/designer/src/lib/shared/widgetfactory.cpp | 2 ++ 1 file changed, 2 insertions(+) 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; -- cgit v0.12