From d0c9350ac45bb22b91df37953394c910e6801895 Mon Sep 17 00:00:00 2001 From: Seraphima Zykova Date: Mon, 19 Dec 2022 19:51:27 +0300 Subject: [PATCH] [FZEditor]Fix crash when deleting a zone while dragging it (#22884) --- .../fancyzones/editor/FancyZonesEditor/CanvasZone.xaml.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/modules/fancyzones/editor/FancyZonesEditor/CanvasZone.xaml.cs b/src/modules/fancyzones/editor/FancyZonesEditor/CanvasZone.xaml.cs index eb5495a83a..f55813bf4c 100644 --- a/src/modules/fancyzones/editor/FancyZonesEditor/CanvasZone.xaml.cs +++ b/src/modules/fancyzones/editor/FancyZonesEditor/CanvasZone.xaml.cs @@ -255,6 +255,11 @@ namespace FancyZonesEditor private void UpdateFromSnappyHelpers() { + if (ZoneIndex >= Model.Zones.Count) + { + return; + } + Int32Rect rect = Model.Zones[ZoneIndex]; if (snappyX != null)