mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-22 01:59:12 +02:00
don't try to access empty string members
git-svn-id: trunk@14369 -
This commit is contained in:
parent
ab8d3d88f9
commit
7234fee1f0
@ -1354,8 +1354,8 @@ begin
|
||||
EndPos:=StartPos+length(NewPath);
|
||||
end;
|
||||
// check if path already exists
|
||||
if FindPathInSearchPath(@Result[StartPos],EndPos-StartPos,
|
||||
@Result[1],StartPos-1)<>nil
|
||||
if (Length(Result) > 0) and
|
||||
(FindPathInSearchPath(@Result[StartPos],EndPos-StartPos, @Result[1],StartPos-1) <> nil)
|
||||
then begin
|
||||
// remove path
|
||||
System.Delete(Result,StartPos,EndPos-StartPos+1);
|
||||
|
Loading…
Reference in New Issue
Block a user