diff options
-rw-r--r-- | xxxterm.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/xxxterm.c b/xxxterm.c index 07388fd..a419b94 100644 --- a/xxxterm.c +++ b/xxxterm.c @@ -4555,9 +4555,13 @@ notify_icon_loaded_cb(WebKitWebView *wv, char *uri, struct tab *t) snprintf(file, sizeof file, "%s/%s.ico", cache_dir, name_hash); g_free(name_hash); if (!stat(file, &sb)) { - /* XXX make sure the icon is not 0 length */ - load_favicon(t); - return (TRUE); + if (sb.st_size > 0) { + load_favicon(t); + return (TRUE); + } + + /* corrupt icon so trash it */ + unlink(file); } dest_uri = g_strdup_printf("file://%s", file); |