[Kde-games-devel] KDE/kdelibs/kdeui/colors

Matthew Woehlke mw_triad at users.sourceforge.net
Mon Sep 17 17:50:40 CEST 2007


SVN commit 713465 by mwoehlke:

Initialize config in KStatefulBrush if it is null (like the apidoc says we do :-) ). This should fix the crash in KGamePopupItem.

CCMAIL: kleag at free.fr
CCMAIL: kde-games-devel at kde.org


 M  +6 -2      kcolorscheme.cpp  


--- trunk/KDE/kdelibs/kdeui/colors/kcolorscheme.cpp #713464:713465
@@ -356,9 +356,9 @@
 
 KColorScheme::KColorScheme(QPalette::ColorGroup state, ColorSet set, KSharedConfigPtr config)
 {
-    if (!config) {
+    if (!config)
         config = KGlobal::config();
-    }
+
     switch (set) {
         case Window:
             d = new KColorSchemePrivate(config, state, "Colors:Window", defaultWindowColors);
@@ -514,6 +514,8 @@
 
 KStatefulBrush::KStatefulBrush(const QBrush &brush, KSharedConfigPtr config)
 {
+    if (!config)
+        config = KGlobal::config();
     d = new KStatefulBrushPrivate[3];
     d[0] = brush;
     d[1] = StateEffects(QPalette::Disabled, config).brush(brush);
@@ -523,6 +525,8 @@
 KStatefulBrush::KStatefulBrush(const QBrush &brush, const QBrush &background,
                                KSharedConfigPtr config)
 {
+    if (!config)
+        config = KGlobal::config();
     d = new KStatefulBrushPrivate[3];
     d[0] = brush;
     d[1] = StateEffects(QPalette::Disabled, config).brush(brush, background);


More information about the kde-games-devel mailing list