diff --git a/ide/project.pp b/ide/project.pp index adba4990df..94efa3b51c 100644 --- a/ide/project.pp +++ b/ide/project.pp @@ -3933,7 +3933,8 @@ var begin for i := 0 to AllEditorsInfoCount - 1 do with AllEditorsInfo[i] do - IsVisibleTab := (WindowID = AWindowID) and (EditorComponent = AnEditor); + if AllEditorsInfo[i].WindowID = AWindowID then + IsVisibleTab := (EditorComponent = AnEditor); AnEditorInfo := EditorInfoWithEditorComponent(AnEditor); if AnEditorInfo = nil then Exit(nil); Result := AnEditorInfo.UnitInfo;