From 16c423fb8f4e3ce09ed310f98c532ad7c5cf6438 Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Thu, 19 Aug 2010 12:49:11 +0200 Subject: Menus: Minor bugfix in popup menus. OpenerMenuBar is not always assigned. Popup menus can of course be used without a Main MenuBar, so I have to do some extra checking first before I call InternalReset. --- src/gui/fpg_menu.pas | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/fpg_menu.pas b/src/gui/fpg_menu.pas index da357640..f7af611d 100644 --- a/src/gui/fpg_menu.pas +++ b/src/gui/fpg_menu.pas @@ -796,7 +796,8 @@ begin op := op.OpenerPopup; end; // notify menubar that we clicked a menu item - OpenerMenuBar.InternalReset; + if Assigned(OpenerMenuBar) then + OpenerMenuBar.InternalReset; VisibleItem(FFocusItem).Click; FFocusItem := -1; end; { if/else } -- cgit v1.2.3-70-g09d2