summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2020-04-11 08:59:50 +0200
committerDaniel Friesel <derf@finalrewind.org>2020-04-11 08:59:50 +0200
commitbceda3a475b57142562dfb57139d6f1b29b6641f (patch)
tree32c1cb2fe3e40228329272fcd694279e3d79f8de /src
parent1c5c3453d54f7e6a901cd61636e469c68f803617 (diff)
ensure cache != NULL before accessing it
Closes #521
Diffstat (limited to 'src')
-rw-r--r--src/imlib.c2
1 files changed, 1 insertions, 1 deletions
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);
}