Commit bceda3a4 authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

ensure cache != NULL before accessing it

Closes #521
parent 1c5c3453
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
	}