]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/utils.cpp
fixed DLL linking of wxMessageOutput class
[wxWidgets.git] / src / motif / utils.cpp
index 1f5d60838ad53510fad0e8d20c54913632548287..d60e87705e54bf77b57265bb45f5f8a1b6182f66 100644 (file)
@@ -524,6 +524,9 @@ XmString wxFindAcceleratorText (const char *s)
 // Change a widget's foreground and background colours.
 void wxDoChangeForegroundColour(WXWidget widget, wxColour& foregroundColour)
 {
+    if (!foregroundColour.Ok())
+        return;
+
     // When should we specify the foreground, if it's calculated
     // by wxComputeColours?
     // Solution: say we start with the default (computed) foreground colour.
@@ -540,6 +543,9 @@ void wxDoChangeForegroundColour(WXWidget widget, wxColour& foregroundColour)
 
 void wxDoChangeBackgroundColour(WXWidget widget, const wxColour& backgroundColour, bool changeArmColour)
 {
+    if (!backgroundColour.Ok())
+        return;
+
     wxComputeColours (XtDisplay((Widget) widget), & backgroundColour,
         (wxColour*) NULL);