* check added to avoid potential SIGSEGV

git-svn-id: trunk@1261 -
This commit is contained in:
Tomas Hajny 2005-10-02 22:18:45 +00:00
parent da9ea7ff88
commit 022e3ceef8

View File

@ -1352,6 +1352,9 @@ implementation
startpc,pc : pchar;
sepch : char;
begin
FindFilePchar:=false;
if Assigned (Path) then
begin
{$ifdef Unix}
sepch:=':';
{$else}
@ -1361,7 +1364,6 @@ implementation
sepch:=';';
{$endif macos}
{$endif Unix}
FindFilePchar:=false;
pc:=path;
repeat
startpc:=pc;
@ -1377,6 +1379,7 @@ implementation
break;
inc(pc);
until false;
end;
foundfile:=f;
end;