diff --git a/source/main.pas b/source/main.pas index 78f1753f..dfc018dc 100644 --- a/source/main.pas +++ b/source/main.pas @@ -1746,6 +1746,9 @@ var i, room: Integer; PanelRect: TRect; begin + // Exit early when user pressed "Cancel" on connection dialog + if csDestroying in ComponentState then + Exit; room := 0; for i := 1 to Statusbar.Panels.Count - 1 do inc(room, Statusbar.Panels[i].Width);