aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2021-02-18 19:37:06 +0000
committerbptato <nincsnevem662@gmail.com>2021-02-18 19:37:06 +0000
commit728fb34e287533b406885434b0e2799dfc1d6d6a (patch)
tree4b068078f9b456d1b982e8b8bcac57d8d26f1893
parentFix small images on kitty (diff)
downloadw3m-728fb34e287533b406885434b0e2799dfc1d6d6a.tar.gz
w3m-728fb34e287533b406885434b0e2799dfc1d6d6a.zip
Fix potential segfault
-rw-r--r--terms.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/terms.c b/terms.c
index 3c42275..04a1bcb 100644
--- a/terms.c
+++ b/terms.c
@@ -564,7 +564,7 @@ put_image_kitty(char *url, int x, int y, int w, int h, int sx, int sy, int sw,
return;
type = guessContentType(url);
- if(!strcasecmp(type, "image/png")) {
+ if(type && !strcasecmp(type, "image/png")) {
t = 100;
} else {
/* TODO: kitty +kitten icat or link imlib/gdkpixbuf? */