瀏覽代碼

#586 do not create grid without virtual screen

Juliette ELSASS 1 年之前
父節點
當前提交
7287ea358d
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      lazpaint/tools/utooldeformationgrid.pas

+ 1 - 0
lazpaint/tools/utooldeformationgrid.pas

@@ -1225,6 +1225,7 @@ var curPt,rightPt,downPt: TPointF;
     xb,yb: Integer;
 begin
   result := EmptyRect;
+  if (VirtualScreen = nil) and (deformationGrid = nil) then exit;
   if not ToolDeformationGridNeeded then exit;
   for xb := 0 to deformationGridNbX-1 do
     for yb := 0 to deformationGridNbY-1 do