X-Git-Url: https://deadsoftware.ru/gitweb?p=d2df-editor.git;a=blobdiff_plain;f=src%2Feditor%2Ff_main.pas;h=e2fdc20540eb336e1dd0f611588044788c4149bf;hp=e4e0643b38045f34c23e8ea78a81895c00965736;hb=09c7e2fe60e25c431d1cea07282f471b8309d2c9;hpb=dc621084d159f9313377df9c5ae3a3dad77b3e08 diff --git a/src/editor/f_main.pas b/src/editor/f_main.pas index e4e0643..e2fdc20 100644 --- a/src/editor/f_main.pas +++ b/src/editor/f_main.pas @@ -2554,8 +2554,10 @@ end; procedure TMainForm.miRecentFileExecute (Sender: TObject); var s, fn: AnsiString; + n: LongInt; begin - s := RecentFiles[(Sender as TMenuItem).Tag]; + n := (Sender as TMenuItem).Tag; + s := RecentFiles[n]; fn := g_ExtractWadName(s); if FileExists(fn) then OpenMap(fn, g_ExtractFilePathName(s)) @@ -2585,7 +2587,7 @@ begin else begin menu.Delete(i); - MI.Destroy(); + Application.ReleaseComponent(MI); end; end;