X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9ce8d6a2b0fec3ce3f6e838445fdea3445d2ce8d..68a2e005a51a87df6cc445345f27443e57ab3608:/src/x11/colour.cpp?ds=sidebyside diff --git a/src/x11/colour.cpp b/src/x11/colour.cpp index 7431369b7f..28bb7c7dda 100644 --- a/src/x11/colour.cpp +++ b/src/x11/colour.cpp @@ -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 ); }