From bceda3a475b57142562dfb57139d6f1b29b6641f Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sat, 11 Apr 2020 08:59:50 +0200 Subject: ensure cache != NULL before accessing it Closes #521 --- src/imlib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/imlib.c b/src/imlib.c index 1cc253c..d2147d9 100644 --- a/src/imlib.c +++ b/src/imlib.c @@ -376,7 +376,7 @@ void feh_reload_image(winwidget w, int resize, int force_new) // if it's an external image, our own cache will also get in your way char *sfn; - if (opt.use_conversion_cache && (sfn = gib_hash_get(conversion_cache, FEH_FILE(w->file->data)->filename)) != NULL) { + if (opt.use_conversion_cache && conversion_cache && (sfn = gib_hash_get(conversion_cache, FEH_FILE(w->file->data)->filename)) != NULL) { free(sfn); gib_hash_set(conversion_cache, FEH_FILE(w->file->data)->filename, NULL); } -- cgit v1.2.3