wxTheColourDatabase->Find() can fail.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38907 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2006-04-25 12:06:51 +00:00
parent 7266451464
commit 81853b9861

View File

@@ -59,7 +59,10 @@ bool wxColourBase::FromString(const wxChar *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());
}
if (Ok())