diff options
author | Francois Andriot <francois.andriot@free.fr> | 2013-05-09 19:08:24 +0200 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2013-05-09 19:08:24 +0200 |
commit | 229d1bcf9bdeb4322dafd35791c46a11605c7383 (patch) | |
tree | b063a2861d60fcd1bd821e9139dd29d2ba07eb42 | |
parent | 14cd57f54a9228241204e230df715139bf922fc5 (diff) | |
download | tdebase-229d1bcf9bdeb4322dafd35791c46a11605c7383.tar.gz tdebase-229d1bcf9bdeb4322dafd35791c46a11605c7383.zip |
Kickoff menu: Do not try to display pixmap if it cannot be loaded
-rw-r--r-- | kicker/kicker/ui/itemview.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
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 ) |