From 9b43909a3be25005bff453db3a459ea70f2c4a9e Mon Sep 17 00:00:00 2001 From: Thomas Hartmann <Thomas.Hartmann@nokia.com> Date: Wed, 21 Jul 2010 12:57:56 +0200 Subject: [PATCH] QmlDesigner.colorWidget: fix crash --- .../qmldesigner/components/propertyeditor/colorwidget.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plugins/qmldesigner/components/propertyeditor/colorwidget.cpp b/src/plugins/qmldesigner/components/propertyeditor/colorwidget.cpp index f316ab9db2d..19c8d0a0973 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/colorwidget.cpp +++ b/src/plugins/qmldesigner/components/propertyeditor/colorwidget.cpp @@ -70,6 +70,8 @@ static inline QString properName(const QColor &color) static inline QColor properColor(const QString &str) { + if (str.isNull()) + return QColor(); int lalpha = 255; QString lcolorStr = str; if (lcolorStr.at(0) == '#' && lcolorStr.length() == 9) { -- GitLab