diff --git a/tests/asserthelper.cpp b/tests/asserthelper.cpp index 9b04e7b38d..60fb05ef96 100644 --- a/tests/asserthelper.cpp +++ b/tests/asserthelper.cpp @@ -13,7 +13,7 @@ std::ostream& operator<<(std::ostream& os, const wxColour& c) { - os << c.GetAsString(wxC2S_HTML_SYNTAX); + os << (c.IsOk() ? c.GetAsString(wxC2S_HTML_SYNTAX) : "invalid"); return os; } diff --git a/tests/graphics/colour.cpp b/tests/graphics/colour.cpp index 0dabeaf3e9..3701b779d6 100644 --- a/tests/graphics/colour.cpp +++ b/tests/graphics/colour.cpp @@ -34,6 +34,9 @@ public: bool match(const wxColour& c) const override { + if ( !c.IsOk() ) + return false; + return c.Red() == m_red && c.Green() == m_green && c.Blue() == m_blue; }