Fix crash when deleting unsaved SR