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

Fix segmentation fault when combining --multiwindow and --reload

Introduced in 3fa39154
parent 5c59089f
Loading
Loading
Loading
Loading
+43 −36
Original line number Diff line number Diff line
@@ -135,6 +135,12 @@ void cb_reload_timer(void *data)

	winwidget w = (winwidget) data;

	/*
	 * multi-window mode has no concept of a "current file" and
	 * dynamically adding/removing windows is not implemented at the moment.
	 * So don't reload filelists in multi-window mode.
	 */
	if (current_file != NULL) {
		/* save the current filename for refinding it in new list */
		current_filename = estrdup(FEH_FILE(current_file->data)->filename);

@@ -176,6 +182,7 @@ void cb_reload_timer(void *data)
		if (!current_file)
			current_file = filelist;
		w->file = current_file;
	}

	feh_reload_image(w, 1, 0);
	feh_add_unique_timer(cb_reload_timer, w, opt.reload);