From: Paul Cornett Date: Thu, 1 Apr 2010 16:59:34 +0000 (+0000) Subject: don't try to create a color named "Default" X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/8536ce5b3f10dfe6dce9e4db23af50c8338f0300?ds=sidebyside don't try to create a color named "Default" git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63817 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/samples/ribbon/ribbondemo.cpp b/samples/ribbon/ribbondemo.cpp index 05bbdc4d1d..aac6468f4a 100644 --- a/samples/ribbon/ribbondemo.cpp +++ b/samples/ribbon/ribbondemo.cpp @@ -641,8 +641,10 @@ wxRibbonGalleryItem* MyFrame::AddColourToGallery(wxRibbonGallery *gallery, wxColour* value) { wxRibbonGalleryItem* item = NULL; - wxColour c(colour); - if(value != NULL) + wxColour c; + if (colour != wxT("Default")) + c = wxColour(colour); + if (!c.IsOk()) c = *value; if(c.IsOk()) {