X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ed39ff57b30a70a2395e07887a70bc01e7a3b7ec..68a2e005a51a87df6cc445345f27443e57ab3608:/src/gtk1/colour.cpp diff --git a/src/gtk1/colour.cpp b/src/gtk1/colour.cpp index c57698a100..ce9b00c4c1 100644 --- a/src/gtk1/colour.cpp +++ b/src/gtk1/colour.cpp @@ -156,12 +156,13 @@ wxColour::wxColour( unsigned char red, unsigned char green, unsigned char blue ) M_COLDATA->m_color.pixel = 0; } + + void wxColour::InitFromName( const wxString &colourName ) { - wxNode *node = (wxNode *) NULL; - if ( (wxTheColourDatabase) && (node = wxTheColourDatabase->Find(colourName)) ) + wxColour* col = NULL; + if ( (wxTheColourDatabase) && (col = wxTheColourDatabase->FindColourNoAdd(colourName)) ) { - wxColour *col = (wxColour*)node->GetData(); UnRef(); if (col) Ref( *col ); }