always return a new pointer from FindColour()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@24204 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -188,6 +188,7 @@ All:
|
||||
All (GUI):
|
||||
|
||||
- bug in wxWindow::RemoveEventHandler() fixed (Yingjun Zhang)
|
||||
- bug in wxColourDatabase::FindColour() which could led to crashes fixed
|
||||
|
||||
wxMSW:
|
||||
|
||||
|
@@ -336,7 +336,7 @@ wxColour *wxColourDatabase::FindColour(const wxString& colour)
|
||||
const wxChar *key = node->GetKeyString();
|
||||
if ( colName == key || colName2 == key )
|
||||
{
|
||||
return (wxColour *)node->Data();
|
||||
return new wxColour(*((wxColour *)node->Data()));
|
||||
}
|
||||
|
||||
node = node->Next();
|
||||
|
Reference in New Issue
Block a user