X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/34fdf76231e5e0adc6f1a0543f19f7ab8fcb91d9..fb2e90c1745beb2c1db7bba7cf35587be392c819:/src/mac/glcanvas.cpp diff --git a/src/mac/glcanvas.cpp b/src/mac/glcanvas.cpp index 44215b6b75..e208531ff4 100644 --- a/src/mac/glcanvas.cpp +++ b/src/mac/glcanvas.cpp @@ -97,15 +97,12 @@ void wxGLContext::Update() void wxGLContext::SetColour(const wxChar *colour) { - float r = 0.0; - float g = 0.0; - float b = 0.0; - wxColour *col = wxTheColourDatabase->FindColour(colour); - if (col) + wxColour col = wxTheColourDatabase->Find(colour); + if (col.Ok()) { - r = (float)(col->Red()/256.0); - g = (float)(col->Green()/256.0); - b = (float)(col->Blue()/256.0); + float r = (float)(col.Red()/256.0); + float g = (float)(col.Green()/256.0); + float b = (float)(col.Blue()/256.0); glColor3f( r, g, b); } }