Carbon: Prevent exception when handling popup menu. Issue #28379, patch from C Western.

git-svn-id: trunk@54575 -
This commit is contained in:
juha 2017-04-08 15:10:25 +00:00
parent 70ab84f55d
commit 4005ada739

View File

@ -271,7 +271,7 @@ begin
if CarbonMenu.Parent.Dismissed=kHIMenuDismissedBySelection then begin
FillChar(Msg{%H-}, SizeOf(Msg), 0);
Msg.msg := LM_ACTIVATE;
CarbonMenu.LCLMenuItem.Dispatch(Msg);
DeliverMessage(CarbonMenu.LCLMenuItem, Msg);
if assigned(CarbonMenu.Parent) then // if parent not closed
CarbonMenu.Parent.Dismissed:=0;
Result := noErr;