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:
Vadim Zeitlin
2003-10-16 17:11:24 +00:00
parent 0fa83ad090
commit 858488c8d0
2 changed files with 2 additions and 1 deletions

View File

@@ -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:

View File

@@ -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();