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:
@@ -59,7 +59,10 @@ bool wxColourBase::FromString(const wxChar *str)
|
|||||||
// because this place can be called from constructor
|
// because this place can be called from constructor
|
||||||
// and 'this' could not be available yet
|
// and 'this' could not be available yet
|
||||||
wxColour clr = wxTheColourDatabase->Find(str);
|
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())
|
if (Ok())
|
||||||
|
Reference in New Issue
Block a user