<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">Provide a fallback for gtk-missing-image in case it is not in IconTheme.

Fixes crash when starting gelide:

terminate called after throwing an instance of 'Gtk::IconThemeError'
Aborted

https://sourceforge.net/tracker/?group_id=213712&amp;atid=1026806&amp;aid=3519711
https://sourceforge.net/p/gelide/bugs/17/

https://sourceforge.net/p/gelide/code/ci/495deb1b8ea05bb33cde70baf2201ea726ccb603/
--- src/ui/info_pannel.cpp
+++ src/ui/info_pannel.cpp
@@ -407,7 +407,9 @@ void CInfoPannel::initDescription(void){
 }
 
 void CInfoPannel::initImages(void){
+	Glib::RefPtr&lt;Gtk::IconTheme&gt; l_icon_theme;
 	Gtk::Image* l_i;
+	bool l_continue;
 
 	l_i = Gtk::manage(new Gtk::Image());
 
@@ -419,7 +421,34 @@ void CInfoPannel::initImages(void){
 	m_notebook_images.append_page(m_image_media, _("Media"));
 
 	//m_default = Gdk::Pixbuf::create_from_file(GELIDE_DEFAULT_IMAGE);
-	m_default = Gtk::IconTheme::get_default()-&gt;load_icon("gtk-missing-image", 200, Gtk::ICON_LOOKUP_USE_BUILTIN);
+	//m_default = Gtk::IconTheme::get_default()-&gt;load_icon("gtk-missing-image", 200, Gtk::ICON_LOOKUP_USE_BUILTIN);
+
+
+	l_icon_theme = Gtk::IconTheme::get_default();
+	l_continue = false;
+	// Comprobamos si se pudo obtener el icontheme
+	if(l_icon_theme){
+		// Intentamos cargar el icono
+		try{
+			m_default = l_icon_theme-&gt;load_icon("gtk-missing-image", 200, Gtk::ICON_LOOKUP_USE_BUILTIN);
+			l_continue = true;
+		}
+		catch(...){
+			l_continue = false;
+		}
+	}
+	// Si no se pudo aÃ±adir el icono del tema, lo aÃ±adimos del fichero
+	if(!l_continue){
+		try
+		{
+			m_default = Gdk::Pixbuf::create_from_file(GELIDE_UI_ICONS "gelide-no-image.png");
+		}
+		catch(const Glib::Exception&amp; l_exception)
+		{
+			GELIDE_WARNING("InfoPannel loading default image (" &lt;&lt; l_exception.what().c_str() &lt;&lt; ")");
+			return;
+		}
+	}
 
 	m_pixbuf_snapshot = m_default-&gt;copy();
 	m_pixbuf_tittle = m_default-&gt;copy();
--- ui/icons/Makefile.am
+++ ui/icons/Makefile.am
@@ -12,6 +12,7 @@
 	gelide-favorite.png \
 	gelide-horizontal-browser.png \
 	gelide-import-systems.png \
+	gelide-no-image.png \
 	gelide-played.png \
 	gelide-rank.png \
 	gelide-show-browser.png \
</pre></body></html>