Skip to content

Commit 66d6747

Browse files
author
Joachim Marder
committed
Fixed issue #48: Recent Items - Random access violation
1 parent 7aaa6e7 commit 66d6747

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Lib/UIRibbon.pas

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -674,8 +674,6 @@ procedure TUIRibbon.DoCommandCreated(const pCommand: TUICommand);
674674
pCommand.Assign(lAction)
675675
{$ifdef DEBUG}else
676676
OutputDebugString(PChar(Format(sNoMappingFound, [lMarkupItem.Name, pCommand.CommandId]))){$endif};
677-
if pCommand.CommandType = TUICommandType.ctRecentItems then
678-
fRecentItems := (pCommand as TUICommandRecentItems);
679677
end;
680678
// Try mapping ctAnchor (Tabs) to an action. If found, assign properties.
681679
// If not found, at least try to localize it.
@@ -692,6 +690,8 @@ procedure TUIRibbon.DoCommandCreated(const pCommand: TUICommand);
692690
Self.LocalizeRibbonElement(pCommand, lMarkupItem);
693691
end;// case/else
694692
end;// if RibbonMapper
693+
if pCommand.CommandType = TUICommandType.ctRecentItems then
694+
fRecentItems := (pCommand as TUICommandRecentItems);
695695
if Assigned(FOnCommandCreate) then
696696
FOnCommandCreate(Self, pCommand);
697697
end;

0 commit comments

Comments
 (0)