Browse Source

avoid crash when multiselection nil

Johann 5 years ago
parent
commit
6e84b48284
1 changed files with 5 additions and 0 deletions
  1. 5 0
      lazpaintcontrols/lcvectororiginal.pas

+ 5 - 0
lazpaintcontrols/lcvectororiginal.pas

@@ -3190,6 +3190,11 @@ begin
       newUnfrozenRangeEnd := idxSelected+1;
     end;
   end else
+  if FMultiselection = nil then
+  begin
+    newUnfrozenRangeStart := 0;
+    newUnfrozenRangeEnd := ShapeCount;
+  end else
   begin
     multiSel := FMultiselection.GetAsMultishape;
     if multiSel.ShapeCount = 0 then