Fixed crash if no image is loaded.