From 12f497705cf700636a7a34ee8084be4fcabb0698 Mon Sep 17 00:00:00 2001 From: juha Date: Sun, 24 Apr 2011 20:21:37 +0000 Subject: [PATCH] IDE: Fix a range error when two ActionListEditors have an action with same name. Patch from Anton, issue #19218 git-svn-id: trunk@30456 - --- ideintf/actionseditor.pas | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ideintf/actionseditor.pas b/ideintf/actionseditor.pas index 9445d1e665..5c43708574 100644 --- a/ideintf/actionseditor.pas +++ b/ideintf/actionseditor.pas @@ -377,10 +377,10 @@ end; procedure TActionListEditor.OnComponentRenamed(AComponent: TComponent); begin - if (not Visible) or (FActionList=nil) - or (not Assigned(FActionList.ActionByName(AComponent.Name))) - then Exit; - lstActionName.Items[lstActionName.ItemIndex] := AComponent.Name; + if Visible and Assigned(FActionList) + and (AComponent is TAction) and (TAction(AComponent).ActionList = FActionList) + and Assigned(FActionList.ActionByName(AComponent.Name)) then + lstActionName.Items[lstActionName.ItemIndex] := AComponent.Name; end; procedure TActionListEditor.OnComponentSelection(