From 823399a552c04821fb0b49d816d733fa21a12a21 Mon Sep 17 00:00:00 2001 From: zecke Date: Thu, 05 Feb 2004 15:57:13 +0000 Subject: Stop trying to scale a null image --- diff --git a/core/launcher/startmenu.cpp b/core/launcher/startmenu.cpp index f17c7f8..b84eed8 100644 --- a/core/launcher/startmenu.cpp +++ b/core/launcher/startmenu.cpp @@ -148,12 +148,14 @@ void StartMenu::createAppEntry( QPopupMenu *menu, QDir dir, QString file ) menu->insertSeparator(); delete applnk; } else { - QPixmap test; - test.convertFromImage( - Resource::loadImage( applnk->icon() ).smoothScale( - AppLnk::smallIconSize(), AppLnk::smallIconSize() ), 0 ); - - menu->insertItem( test, applnk->name(), + QPixmap test; + QImage img = Resource::loadImage( applnk->icon() ); + if(!img.isNull() ) + test.convertFromImage( + img.smoothScale( + AppLnk::smallIconSize(), AppLnk::smallIconSize() ), 0 ); + + menu->insertItem( test, applnk->name(), currentItem + APPLNK_ID_OFFSET ); appLnks.insert( currentItem + APPLNK_ID_OFFSET, applnk ); currentItem++; -- cgit v0.9.0.2