From 64a94e6b6ee261c21c68709134631a16b39a0256 Mon Sep 17 00:00:00 2001 From: Michael Krelin Date: Mon, 28 Jan 2008 23:33:00 +0000 Subject: fixed segfault when trying to display uncategorized event Signed-off-by: Michael Krelin --- diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp index 0f9a38f..d38cb00 100644 --- a/korganizer/koagendaitem.cpp +++ b/korganizer/koagendaitem.cpp @@ -120,7 +120,8 @@ 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(mIncidence))->isCompleted()) ) mBackgroundColor =KOPrefs::instance()->mTodoDoneColor; -- cgit v0.9.0.2