summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--korganizer/koagendaitem.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp
index 0f9a38f..d38cb00 100644
--- a/korganizer/koagendaitem.cpp
+++ b/korganizer/koagendaitem.cpp
@@ -122,3 +122,4 @@ void KOAgendaItem::initColor ()
QStringList categories = mIncidence->categories();
- QString cat = categories.first();
+ QString cat;
+ if(!categories.isEmpty()) cat = categories.first();
if (cat.isEmpty()) {