mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 04:19:19 +02:00
IDE: fixed access violation in InitialSetupDlg when path is not valid
git-svn-id: trunk@29932 -
This commit is contained in:
parent
9b84e49668
commit
49b49dd7e0
@ -1275,9 +1275,9 @@ begin
|
||||
if Dirs<>nil then begin
|
||||
i:=Dirs.Count-1;
|
||||
while (i>=0) and (TSDFileInfo(Dirs[i]).Caption<>Result) do dec(i);
|
||||
if i>=0 then
|
||||
Result:=TSDFileInfo(Dirs[i]).Filename;
|
||||
end;
|
||||
if i>=0 then
|
||||
Result:=TSDFileInfo(Dirs[i]).Filename;
|
||||
Result:=ChompPathDelim(TrimFilename(Result));
|
||||
if Result<>'' then
|
||||
Result:=ChompPathDelim(TrimFilename(ExpandFileNameUTF8(Result)));
|
||||
@ -1293,9 +1293,9 @@ begin
|
||||
if Dirs<>nil then begin
|
||||
i:=Dirs.Count-1;
|
||||
while (i>=0) and (TSDFileInfo(Dirs[i]).Caption<>Result) do dec(i);
|
||||
if i>=0 then
|
||||
Result:=TSDFileInfo(Dirs[i]).Filename;
|
||||
end;
|
||||
if i>=0 then
|
||||
Result:=TSDFileInfo(Dirs[i]).Filename;
|
||||
Result:=TrimFilename(Result);
|
||||
end;
|
||||
|
||||
@ -1309,9 +1309,9 @@ begin
|
||||
if Dirs<>nil then begin
|
||||
i:=Dirs.Count-1;
|
||||
while (i>=0) and (TSDFileInfo(Dirs[i]).Caption<>Result) do dec(i);
|
||||
if i>=0 then
|
||||
Result:=TSDFileInfo(Dirs[i]).Filename;
|
||||
end;
|
||||
if i>=0 then
|
||||
Result:=TSDFileInfo(Dirs[i]).Filename;
|
||||
Result:=ChompPathDelim(TrimFilename(Result));
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user