Explorar o código

avoid crash when multiselection nil

Johann %!s(int64=5) %!d(string=hai) anos
pai
achega
6e84b48284
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  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