aboutsummaryrefslogtreecommitdiff
path: root/ui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ui.cpp')
-rw-r--r--ui.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/ui.cpp b/ui.cpp
index 800bbfdf0d..d17c208f9c 100644
--- a/ui.cpp
+++ b/ui.cpp
@@ -109,6 +109,8 @@ void SetItemTextColour(wxListCtrl* listCtrl, int nIndex, const wxColour& colour)
// so don't want to set it unless it's different. Default colour has
// alpha 0 transparent, so our colours don't match using operator==.
wxColour c1 = listCtrl->GetItemTextColour(nIndex);
+ if (!c1.IsOk())
+ c1 = wxColour(0,0,0);
if (colour.Red() != c1.Red() || colour.Green() != c1.Green() || colour.Blue() != c1.Blue())
listCtrl->SetItemTextColour(nIndex, colour);
}