mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2026-03-13 09:24:25 +08:00
Follow up to rev 972: Fix a AV / nil reference to ActiveSynMemo in popupQuery.OnPopup which is called when a shortcut is used (fx F9 to execute a query).
This commit is contained in:
@@ -4121,6 +4121,13 @@ begin
|
||||
// Check on which memo the menu was popped up
|
||||
ActiveSynMemo := TSynMemo( TPopupMenu(Sender).PopupComponent );
|
||||
|
||||
// When a shortcut from popupQuery is used, this procedure is
|
||||
// also called, which then leads to PopupComponent being nil.
|
||||
// However, this procedure only changes visible things in popupQuery,
|
||||
// so we only need to run it if the popup is really displayed.
|
||||
if ActiveSynMemo = nil then
|
||||
Exit;
|
||||
|
||||
// Depending which SynMemo is focused, (de-)activate some menuitems
|
||||
// The popupQuery is used in both Filter- and Query-Memo
|
||||
InQueryMemo := ActiveSynMemo = SynMemoQuery;
|
||||
|
||||
Reference in New Issue
Block a user