gif_deanimate(): Confirm we've got an image before trying to write it