git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38907
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// because this place can be called from constructor
// and 'this' could not be available yet
wxColour clr = wxTheColourDatabase->Find(str);
// because this place can be called from constructor
// and 'this' could not be available yet
wxColour clr = wxTheColourDatabase->Find(str);
- Set((unsigned char)clr.Red(), (unsigned char)clr.Green(), (unsigned char)clr.Blue());
+ if (clr.Ok())
+ Set((unsigned char)clr.Red(),
+ (unsigned char)clr.Green(),
+ (unsigned char)clr.Blue());