#include "wx/colour.h"
-#include "wx/gdicmn.h"
-#include "wx/log.h"
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+#endif
+#include "wx/gdicmn.h"
// ============================================================================
// 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());
}
if (Ok())