From 89a5256bf2b7292e0fcbd6c7fb0d5a3901271645 Mon Sep 17 00:00:00 2001 From: infirit Date: Thu, 18 Dec 2014 21:59:20 +0100 Subject: Avoid crash if icon is not found by catching exception Taken from GSM commit: 0d394b2d9df72d9ad67deafebf9174b38b42a6d9 From: Robert Roth Gnome bug: https://bugzilla.gnome.org/show_bug.cgi?id=662463 --- src/iconthemewrapper.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/iconthemewrapper.cpp b/src/iconthemewrapper.cpp index 4a66f5c..1e84b31 100644 --- a/src/iconthemewrapper.cpp +++ b/src/iconthemewrapper.cpp @@ -1,6 +1,7 @@ #include #include +#include #include "iconthemewrapper.h" @@ -19,5 +20,10 @@ procman::IconThemeWrapper::load_icon(const Glib::ustring& icon_name, g_error("Cannot load icon '%s' from theme: %s", icon_name.c_str(), error.what().c_str()); return Glib::RefPtr(); } + catch (Gio::Error &error) + { + g_debug("Could not load icon '%s' : %s", icon_name.c_str(), error.what().c_str()); + return Glib::RefPtr(); + } } -- cgit v1.2.1