ENH: Fixed crash when deleting selected==reference layer.
ENH: Fixed crash when deleting selected==reference layer.

orfeotoolbox/OTB,orfeotoolbox/OTB,orfeotoolbox/OTB,orfeotoolbox/OTB,orfeotoolbox/OTB,orfeotoolbox/OTB