X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/999836aacade840a5d9a0cbb5fad7b1d4de62c93..fe4a107dda9021ed2cdbeda0fcb2d7c02bbfa963:/src/generic/fontdlgg.cpp diff --git a/src/generic/fontdlgg.cpp b/src/generic/fontdlgg.cpp index 427f51b1a2..9ac0c7dcfa 100644 --- a/src/generic/fontdlgg.cpp +++ b/src/generic/fontdlgg.cpp @@ -339,11 +339,11 @@ void wxGenericFontDialog::OnChangeFont(wxCommandEvent& WXUNUSED(event)) m_previewer->SetFont(dialogFont); if (colourChoice->GetStringSelection() != wxT("")) { - wxColour *col = wxTheColourDatabase->FindColour(colourChoice->GetStringSelection()); - if (col) + wxColour col = wxTheColourDatabase->Find(colourChoice->GetStringSelection()); + if (col.Ok()) { - m_fontData.m_fontColour = *col; - m_previewer->SetForegroundColour(*col); + m_fontData.m_fontColour = col; + m_previewer->SetForegroundColour(col); } } m_previewer->Refresh();