]> git.saurik.com Git - wxWidgets.git/blobdiff - src/x11/colour.cpp
Added implementations for two cases of wxSystemSettingsNative::GetMetric to
[wxWidgets.git] / src / x11 / colour.cpp
index 7431369b7ff7d27a43015b4e753c1487bb6be2b5..28bb7c7ddab94244c2cc53718eeeeee673b11c2c 100644 (file)
@@ -157,10 +157,9 @@ wxColour::wxColour( unsigned char red, unsigned char green, unsigned char blue )
 
 void wxColour::InitFromName( const wxString &colourName )
 {
-    wxNode *node = (wxNode *) NULL;
-    if ( (wxTheColourDatabase) && (node = wxTheColourDatabase->Find(colourName)) )
+    wxColour* col;
+    if ( (wxTheColourDatabase) && (col = wxTheColourDatabase->FindColourNoAdd(colourName)) )
     {
-        wxColour *col = (wxColour*)node->GetData();
         UnRef();
         if (col) Ref( *col );
     }