X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/79654e256bc6ee918cd15a6ec1c60c6bada8a6e8..9548c49a6a1e4533976450205de136d9edbe91b0:/src/common/gdicmn.cpp?ds=inline diff --git a/src/common/gdicmn.cpp b/src/common/gdicmn.cpp index 48925f3429..09222b21d4 100644 --- a/src/common/gdicmn.cpp +++ b/src/common/gdicmn.cpp @@ -364,7 +364,8 @@ wxColour *wxColourDatabase::FindColour(const wxString& colour) #ifdef __WXGTK__ wxColour *col = new wxColour( colour ); - if (!(col->Ok())) { + if (!(col->Ok())) + { delete col; return (wxColour *) NULL; } @@ -382,7 +383,7 @@ wxColour *wxColourDatabase::FindColour(const wxString& colour) Display* display = (Display*) wxGetDisplay(); #endif /* MATTHEW: [4] Use wxGetMainColormap */ - if (!XParseColor(display, (Colormap) wxTheApp->GetMainColormap((WXDisplay*) display), colour,&xcolour)) + if (!XParseColor(display, (Colormap) wxTheApp->GetMainColormap((WXDisplay*) display), colour.ToAscii() ,&xcolour)) return NULL; #if wxUSE_NANOX