From ed140c230c81e4e5652b08a6aa151470426aa9df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Stegh=C3=B6fer?= Date: Mon, 16 Feb 2015 11:29:29 +0100 Subject: [PATCH] mainwindow: Catch Gdk::PixbufError Due to another bug the MIME type guessing of PNG files was broken on my Ubuntu system. This made pavucontrol crash on startup (while loading the necessary icons) without a helpful error message (requiring a lot of debugging effort). Although this is not originally pavucontrol's fault, I think that pavucontrol could be more robust about such a problem, especially because: A) In a complex database like the one to guess MIME types (that is populated from hundres of different packages) this can happen from time to time and B) pavucontrol already has some fallback options in place - they are just not active in this specific case. BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=88813 --- src/mainwindow.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mainwindow.cc b/src/mainwindow.cc index ec07b96..1b15dfb 100644 --- a/src/mainwindow.cc +++ b/src/mainwindow.cc @@ -253,6 +253,8 @@ static void set_icon_name_fallback(Gtk::Image *i, const char *name, Gtk::IconSiz i->set(name); } catch (Gio::Error &e) { i->set(name); + } catch (Gdk::PixbufError &e) { + i->set(name); } }