diff --git a/docs/changes.txt b/docs/changes.txt index 6fb2a18465..fade8cda1a 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -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: diff --git a/src/common/gdicmn.cpp b/src/common/gdicmn.cpp index 09222b21d4..77d7134499 100644 --- a/src/common/gdicmn.cpp +++ b/src/common/gdicmn.cpp @@ -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();