summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graeme@mastermaths.co.za>2010-08-19 12:49:11 +0200
committerGraeme Geldenhuys <graeme@mastermaths.co.za>2010-08-19 12:49:11 +0200
commit16c423fb8f4e3ce09ed310f98c532ad7c5cf6438 (patch)
treecbc38c83ac1d4f515590451a0adf1a3350200370
parentad4ffd2bde0095bae514ee65e5f1cfd2f21380d0 (diff)
downloadfpGUI-16c423fb8f4e3ce09ed310f98c532ad7c5cf6438.tar.xz
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.
-rw-r--r--src/gui/fpg_menu.pas3
1 files changed, 2 insertions, 1 deletions
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 }