fix crash if no image file is available

fix crash if no image file is available while project start
fix crash if no image file is available on entering edit mode of Paintroid