From 3ecc07595f41f436430291fb2299dd540c01f292 Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Sun, 4 Oct 2009 14:20:43 +0200 Subject: Store the correct parent engine when opening new connection over existing one Fixes crashes on tab duplication and program exit --- UMain.pas | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'UMain.pas') diff --git a/UMain.pas b/UMain.pas index b78bbe6..e08eb10 100644 --- a/UMain.pas +++ b/UMain.pas @@ -6227,6 +6227,8 @@ begin WriteConnections; // Save connection manager data if b and (FConnectionManager.ConnectedEngine <> nil) then begin + while FConnectionManager.ConnectedEngine.ParentEngine is TVFSEngine do + FConnectionManager.ConnectedEngine.ParentEngine := FConnectionManager.ConnectedEngine.ParentEngine.ParentEngine; if FConnectionManager.SourcePanelEngine is TVFSEngine then CloseVFS(LeftLastFocused, True); if LeftLastFocused then LeftPanelEngine := FConnectionManager.ConnectedEngine else RightPanelEngine := FConnectionManager.ConnectedEngine; @@ -6252,6 +6254,8 @@ begin WriteConnections; // Save connection manager data if b and (FQuickConnect.ConnectedEngine <> nil) then begin + while FQuickConnect.ConnectedEngine.ParentEngine is TVFSEngine do + FQuickConnect.ConnectedEngine.ParentEngine := FQuickConnect.ConnectedEngine.ParentEngine.ParentEngine; if FQuickConnect.SourcePanelEngine is TVFSEngine then CloseVFS(LeftLastFocused, True); if LeftLastFocused then LeftPanelEngine := FQuickConnect.ConnectedEngine else RightPanelEngine := FQuickConnect.ConnectedEngine; -- cgit v1.2.3