Fixed segfault when removing first image from file list, fixes issue #112