Fixes error on closing an image view pane

An ImageEditor is then received in the callback, but an image editor
doesn’t have an off method.