mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-05 19:40:12 +01:00
Check if the colour string is not empty before trying to pull something out of it. See #15210.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@74026 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -216,7 +216,8 @@ def run():
|
||||
// Is it a string?
|
||||
else if (PyBytes_Check(sipPy) || PyUnicode_Check(sipPy)) {
|
||||
wxString spec = Py2wxString(sipPy);
|
||||
if (spec.GetChar(0) == '#'
|
||||
if (!spec.empty()
|
||||
&& spec.GetChar(0) == '#'
|
||||
&& (spec.length() == 7 || spec.length() == 9)) { // It's #RRGGBB[AA]
|
||||
long red, green, blue;
|
||||
red = green = blue = 0;
|
||||
|
||||
Reference in New Issue
Block a user