Comment from: Adam Lydick <lydickaw (at) ruffledpenguin (dot) org>
LB's icon resolving code sometimes returns null (I assume this is when a
app was not assigned an icon, but has a desktop entry). This causes a
segfault in lb_get_pixbuf_from_icon_name (lb-utils.c).
I added some null/empty checking as a quick fix. This seems to work,
because when the function returns null, LB handles it by substituting a
default "application" icon.
GdkPixbuf *
lb_get_pixbuf_from_icon_name (const gchar *icon_name)
{
GdkPixbuf *pixbuf;
gchar *tmp, *dot;
GError *error = NULL;
/* return null if we get a null or empty string */
if (icon_name == NULL || icon_name[0] == '\0')
return NULL;
/* Handle absolute paths. */
if (icon_name[0] == '/') {
return gdk_pixbuf_new_from_file_at_size (icon_name, 64,
64, NULL);
}
}