From 244dabb83477ab71b8f023c58461b3246988c34c Mon Sep 17 00:00:00 2001 From: Scott Balneaves Date: Mon, 19 Nov 2012 22:42:09 -0600 Subject: Fixes issue #9 --- src/prettytable.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/prettytable.cpp b/src/prettytable.cpp index a3c3947..10ee060 100644 --- a/src/prettytable.cpp +++ b/src/prettytable.cpp @@ -40,6 +40,7 @@ void PrettyTable::on_application_opened(MatewnckScreen* screen, MatewnckApplication* app, gpointer data) { PrettyTable * const that = static_cast(data); + FILE *f; pid_t pid = matewnck_application_get_pid(app); @@ -51,7 +52,11 @@ PrettyTable::on_application_opened(MatewnckScreen* screen, MatewnckApplication* Glib::RefPtr icon; - icon = that->theme->load_icon(icon_name, APP_ICON_SIZE, Gtk::ICON_LOOKUP_USE_BUILTIN); + f = fopen (icon_name, "r"); + if (f != NULL) { + fclose (f); + icon = that->theme->load_icon(icon_name, APP_ICON_SIZE, Gtk::ICON_LOOKUP_USE_BUILTIN); + } if (not icon) { icon = Glib::wrap(matewnck_application_get_icon(app), /* take_copy */ true); -- cgit v1.2.1