#18623: ../src/gtk/colour.cpp(218): assert ""IsOk()"" failed in Alpha(): invalid
colour
-------------------------+-------------------------
Reporter: ettl.martin | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: wxGTK | Version: dev-latest
Keywords: assert | Blocked By:
Blocking: | Patch: 0
-------------------------+-------------------------
I am not sure if this is a bug or desired behavior. Calling
{{{wxColour::GetAsString()}}} from an {{{wxColour}}} object that is
initialized with {{{wxNullColour}}} behaves not consistent on Windows and
GTK.
{{{
#!c
wxColour c = wxNullColour;
wxString str = c.GetAsString();
// - The content of str on Windows is "rgba(0, 0, 0, 0.000)"
// and NO assert message is thrown
// - On wxGTK an assert message is thrown
/*../src/gtk/colour.cpp(218): assert ""IsOk()"" failed in Alpha():
invalid colour
../src/gtk/colour.cpp(185): assert ""IsOk()"" failed in Red():
invalid colour
../src/gtk/colour.cpp(196): assert ""IsOk()"" failed in Green():
invalid colour
../src/gtk/colour.cpp(207): assert ""IsOk()"" failed in Blue():
invalid colour*/
}}}
You can give it a try using the attached patch (minimal.patch)
--
Ticket URL: <
https://trac.wxwidgets.org/ticket/18623>