image: handle multiple images correctly

Don't stop the application when only one window is closed. Don't stall
indefinitely if no valid image file is given as input.
1 file changed