Code

Only add builtin icons if loading from SVG succeeded
authortweenk <tweenk@users.sourceforge.net>
Sun, 12 Apr 2009 22:42:20 +0000 (22:42 +0000)
committertweenk <tweenk@users.sourceforge.net>
Sun, 12 Apr 2009 22:42:20 +0000 (22:42 +0000)
src/widgets/icon.cpp

index 670a15838076a9363ad9a0990bd9fa8a5e861cfb..deb3e73017356f1c5c41f9cff0e81c45a093a847 100644 (file)
@@ -223,7 +223,7 @@ void sp_icon_fetch_pixbuf( SPIcon *icon )
             if (!pb) {
                 pb = sp_icon_image_load_svg( icon->name, Inkscape::getRegisteredIconSize(icon->lsize), icon->psize );
                 // if this was loaded from SVG, add it as a builtin icon
-                gtk_icon_theme_add_builtin_icon(icon->name, icon->psize, pb);
+                if (pb) gtk_icon_theme_add_builtin_icon(icon->name, icon->psize, pb);
             }
             if (!pb) {
                 pb = sp_icon_image_load_pixmap( icon->name, icon->lsize, icon->psize );