diff --git a/src/editor/f_main.pas b/src/editor/f_main.pas
index 4d62e2ef6a0c04dfe7d373b0ac7b515dc997f174..58b6210233a22db2cce454729f3e84538e6c5190 100644 (file)
--- a/src/editor/f_main.pas
+++ b/src/editor/f_main.pas
if Button = mbMiddle then
MouseMDown := False;
- DrawRect := nil;
+ if DrawRect <> nil then
+ begin
+ Dispose(DrawRect);
+ DrawRect := nil;
+ end;
+
ResizeType := RESIZETYPE_NONE;
TextureID := 0;
end;
// Клавиши мыши не зажаты:
- if (not MouseRDown) and (not MouseLDown) then
+ if (not MouseRDown) and (not MouseLDown) and (DrawRect <> nil) then
+ begin
+ Dispose(DrawRect);
DrawRect := nil;
+ end;
// Строка состояния - координаты мыши:
StatusBar.Panels[1].Text := Format('(%d:%d)',