-rw-r--r-- | korganizer/koagendaitem.cpp | 3 |
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 @@ -121,5 +121,6 @@ void KOAgendaItem::initColor () else { QStringList categories = mIncidence->categories(); - QString cat = categories.first(); + QString cat; + if(!categories.isEmpty()) cat = categories.first(); if (cat.isEmpty()) { if ( (mIncidence->typeID() == todoID ) &&((static_cast<Todo*>(mIncidence))->isCompleted()) ) |