X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/975b6bcf9b134b950832a60fd2e845e5f1bcd6bf..4b1ae1539c549eb612e5d2b6876124138ce9cb4e:/src/msw/colordlg.cpp diff --git a/src/msw/colordlg.cpp b/src/msw/colordlg.cpp index 467b05a3cd..92036a89af 100644 --- a/src/msw/colordlg.cpp +++ b/src/msw/colordlg.cpp @@ -42,7 +42,7 @@ #include "wx/msgdlg.h" #endif -#if wxUSE_COLOURDLG && !wxUSE_SMARTPHONE +#if wxUSE_COLOURDLG && !defined(__SMARTPHONE__) #include "wx/msw/private.h" #include "wx/colordlg.h" @@ -128,7 +128,12 @@ int wxColourDialog::ShowModal() int i; for (i = 0; i < 16; i++) - custColours[i] = wxColourToRGB(m_colourData.m_custColours[i]); + { + if (m_colourData.m_custColours[i].Ok()) + custColours[i] = wxColourToRGB(m_colourData.m_custColours[i]); + else + custColours[i] = RGB(255,255,255); + } chooseColorStruct.lStructSize = sizeof(CHOOSECOLOR); if ( m_parent )