fixes #4322 Script error when you save image in ImageEditor