From 229d1bcf9bdeb4322dafd35791c46a11605c7383 Mon Sep 17 00:00:00 2001 From: Francois Andriot Date: Thu, 9 May 2013 19:08:24 +0200 Subject: Kickoff menu: Do not try to display pixmap if it cannot be loaded --- kicker/kicker/ui/itemview.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kicker/kicker/ui/itemview.cpp b/kicker/kicker/ui/itemview.cpp index 729a7b865..ea7894343 100644 --- a/kicker/kicker/ui/itemview.cpp +++ b/kicker/kicker/ui/itemview.cpp @@ -139,7 +139,10 @@ void KMenuItem::setDescription(const TQString& txt) void KMenuItem::setIcon(const TQString& icon, int size) { m_icon = icon; - TQListViewItem::setPixmap(0, TDEGlobal::iconLoader()->loadIcon(icon, TDEIcon::Panel, size )); + TQPixmap pixmap = TDEGlobal::iconLoader()->loadIcon(icon, TDEIcon::Panel, size, TDEIcon::DefaultState, 0L, true); + if (!pixmap.isNull()) { + TQListViewItem::setPixmap(0, pixmap); + } } void KMenuItem::setHasChildren( bool flag ) -- cgit v1.2.1