Protect against a crash if an icon is requested without stat information
This commit is contained in:
parent
1dcd927b71
commit
9c0b54d904
|
@ -62,8 +62,8 @@ GdkPixbuf * vfs_mime_icon(Mime * mime, char const * filename,
|
|||
ret = _mime_icon_folder(mime, filename, lst, st, size);
|
||||
else
|
||||
mime_icons(mime, type, size, &ret, -1);
|
||||
if(ret == NULL)
|
||||
return NULL;
|
||||
if(ret == NULL || lst == NULL)
|
||||
return ret;
|
||||
/* determine the emblem */
|
||||
if(S_ISCHR(lst->st_mode) || S_ISBLK(lst->st_mode))
|
||||
emblem = "emblem-system";
|
||||
|
|
Loading…
Reference in New Issue
Block a user