diff --git a/Projects/SAMufasaGUI/testunit.pas b/Projects/SAMufasaGUI/testunit.pas index 1c7b980..9a86611 100644 --- a/Projects/SAMufasaGUI/testunit.pas +++ b/Projects/SAMufasaGUI/testunit.pas @@ -1683,8 +1683,9 @@ begin if not DeleteTab(i,true) then begin; CloseAction := caNone; - exit + exit; end; + FreeAndNil(ExtManager); end; procedure TForm1.FormCreate(Sender: TObject); @@ -1754,6 +1755,8 @@ begin TMufasaTab(Tabs[i]).Free; for i := 0 to high(RecentFileItems) do RecentFileItems[i].Free; + if ExtManager <> nil then + ExtManager.free; Tabs.free; Selector.Free; Picker.Free; @@ -1762,7 +1765,6 @@ begin SetLength(DebugStream, 0); RecentFiles.Free; DebugCriticalSection.Free; - ExtManager.free; {$ifdef MSWindows} if not UnRegisterHotkey(Self.Handle,0) then mDebugLn('Unable to unregister ctrl + alt + s as global hotkey');