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:56:17 +0200 |
commit | 6b7e1d5bb5fb97c7703bbd44e91b9d235f4b2a04 (patch) | |
tree | 1cd0583edc67535828fbf9da8f26e0cd271fd2fe | |
parent | b3928f85d5f291d620ad9924990235b2910556d0 (diff) | |
download | tdebase-6b7e1d5bb5fb97c7703bbd44e91b9d235f4b2a04.tar.gz tdebase-6b7e1d5bb5fb97c7703bbd44e91b9d235f4b2a04.zip |
Kickoff menu: Do not try to display pixmap if it cannot be loaded
(cherry picked from commit 229d1bcf9bdeb4322dafd35791c46a11605c7383)
-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 6cb94ed56..6e35abdc6 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, KGlobal::iconLoader()->loadIcon(icon, KIcon::Panel, size )); + TQPixmap pixmap = KGlobal::iconLoader()->loadIcon(icon, KIcon::Panel, size, KIcon::DefaultState, 0L, true); + if (!pixmap.isNull()) { + TQListViewItem::setPixmap(0, pixmap); + } } void KMenuItem::setHasChildren( bool flag ) |