From 6fddd1aaf43237a88ea8b0d191c8dc1542558bf9 Mon Sep 17 00:00:00 2001 From: juha Date: Tue, 29 Sep 2020 23:07:27 +0000 Subject: [PATCH] IDE: Fix a crash if IDE is aborted before updating configuration. git-svn-id: trunk@63939 - --- ide/main.pp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ide/main.pp b/ide/main.pp index 8dff80d0d3..d5a7dc8d11 100644 --- a/ide/main.pp +++ b/ide/main.pp @@ -1664,8 +1664,9 @@ end; destructor TMainIDE.Destroy; begin ToolStatus:=itExiting; - - IDECommandList.RemoveCustomUpdateEvent(@UpdateMainIDECommands); + // IDECommandList may be Nil if the IDE is aborted before updating configuration. + if Assigned(IDECommandList) then + IDECommandList.RemoveCustomUpdateEvent(@UpdateMainIDECommands); if Assigned(ExternalToolList) then ExternalToolList.TerminateAll;