From 8d27e1d4ec53a0888491dd394139e484e2fcbc8a Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Sun, 13 Jan 2019 13:38:55 +0100 Subject: [PATCH] Avoid EAccessViolation when pressing F5 too quickly. See https://www.heidisql.com/forum.php?t=26327 --- source/main.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/main.pas b/source/main.pas index df21c58b..f9130f41 100644 --- a/source/main.pas +++ b/source/main.pas @@ -6440,7 +6440,7 @@ begin menuTreeCollapseAll.Enabled := False; menuTreeOptions.Enabled := False; end; - if ActiveConnection.Parameters.IsMySQL then begin + if (ActiveConnection <> nil) and (ActiveConnection.Parameters.IsMySQL) then begin Version := ActiveConnection.ServerVersionInt; actCreateView.Enabled := actCreateView.Enabled and (Version >= 50001); actCreateRoutine.Enabled := actCreateRoutine.Enabled and (Version >= 50003);