diff --git a/lcl/lresources.pp b/lcl/lresources.pp index e639aa3d7b..02863b944c 100644 --- a/lcl/lresources.pp +++ b/lcl/lresources.pp @@ -1498,6 +1498,10 @@ begin end; procedure TLResourceList.Sort; +var + i: Integer; + r1: TLResource; + r2: TLResource; begin if FSortedCount = FList.Count then exit; @@ -1507,6 +1511,14 @@ begin // merge both Merge(FList, FMergeList, 0, FSortedCount, FList.Count - 1); FSortedCount := FList.Count; + // check for doubles + for i:=0 to FList.Count-2 do + begin + r1:=TLResource(FList[i]); + r2:=TLResource(FList[i+1]); + if (AnsiCompareText(r1.Name,r2.Name)=0) and (r1.ValueType=r2.ValueType) then + DebugLn(['TLResourceList.Sort ',i,' DUPLICATE RESOURCE FOUND: ',r1.Name,':',r1.ValueType]); + end; end; procedure TLResourceList.MergeSort(List, MergeList: TList; Pos1, Pos2: integer);