IDE: improvements to Use Unit dialog, issue #20743

git-svn-id: trunk@34058 -
This commit is contained in:
juha 2011-12-09 00:43:47 +00:00
parent 09d427d902
commit 8d490675de

View File

@ -354,9 +354,9 @@ begin
with UnitsListBox do
if ItemIndex >= 0 then
begin
IdentItem := TIdentifierListItem(Items.Objects[ItemIndex]);
if Assigned(IdentItem) then
if Items.Objects[ItemIndex] is TIdentifierListItem then
begin
IdentItem := TIdentifierListItem(Items.Objects[ItemIndex]);
Result := IdentItem.Identifier;
CodeBuf := CodeToolBoss.FindUnitSource(SourceEditorManager.ActiveEditor.CodeBuffer, Result, '');
if Assigned(CodeBuf) then