X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3c3ead1d1513a5eb79091a604f4e42b45d1bdf5d..dd71bfb9921430755a885117cc6c9843c62dafda:/samples/ribbon/ribbondemo.cpp 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()) {