mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-15 18:19:07 +02:00
IDE: Prevent AV with typing a non-existent file name for Convert Delphi Unit. Issue #25538
git-svn-id: trunk@43735 -
This commit is contained in:
parent
692c4c1ef3
commit
8db456be20
@ -4506,9 +4506,9 @@ begin
|
|||||||
try
|
try
|
||||||
InputHistories.ApplyFileDialogSettings(OpenDialog);
|
InputHistories.ApplyFileDialogSettings(OpenDialog);
|
||||||
OpenDialog.Title:=lisChooseDelphiUnit;
|
OpenDialog.Title:=lisChooseDelphiUnit;
|
||||||
|
OpenDialog.Options:=OpenDialog.Options+[ofPathMustExist,ofFileMustExist,ofAllowMultiSelect];
|
||||||
OpenDialog.Filter:=lisDelphiUnit+' (*.pas)|*.pas|'+
|
OpenDialog.Filter:=lisDelphiUnit+' (*.pas)|*.pas|'+
|
||||||
dlgAllFiles+' ('+GetAllFilesMask+')|' + GetAllFilesMask;
|
dlgAllFiles+' ('+GetAllFilesMask+')|' + GetAllFilesMask;
|
||||||
OpenDialog.Options:=OpenDialog.Options+[ofAllowMultiSelect];
|
|
||||||
if InputHistories.LastConvertDelphiUnit<>'' then begin
|
if InputHistories.LastConvertDelphiUnit<>'' then begin
|
||||||
OpenDialog.InitialDir:=ExtractFilePath(InputHistories.LastConvertDelphiUnit);
|
OpenDialog.InitialDir:=ExtractFilePath(InputHistories.LastConvertDelphiUnit);
|
||||||
OpenDialog.Filename :=ExtractFileName(InputHistories.LastConvertDelphiUnit);
|
OpenDialog.Filename :=ExtractFileName(InputHistories.LastConvertDelphiUnit);
|
||||||
@ -4543,6 +4543,7 @@ begin
|
|||||||
try
|
try
|
||||||
InputHistories.ApplyFileDialogSettings(OpenDialog);
|
InputHistories.ApplyFileDialogSettings(OpenDialog);
|
||||||
OpenDialog.Title:=lisChooseDelphiProject;
|
OpenDialog.Title:=lisChooseDelphiProject;
|
||||||
|
OpenDialog.Options:=OpenDialog.Options+[ofPathMustExist,ofFileMustExist];
|
||||||
OpenDialog.Filter:=lisDelphiProject+' (*.dpr)|*.dpr|'+
|
OpenDialog.Filter:=lisDelphiProject+' (*.dpr)|*.dpr|'+
|
||||||
lisLazarusProject+' (*.lpr)|*.lpr|'+
|
lisLazarusProject+' (*.lpr)|*.lpr|'+
|
||||||
dlgAllFiles+' ('+GetAllFilesMask+')|' + GetAllFilesMask;
|
dlgAllFiles+' ('+GetAllFilesMask+')|' + GetAllFilesMask;
|
||||||
@ -4572,6 +4573,7 @@ begin
|
|||||||
try
|
try
|
||||||
InputHistories.ApplyFileDialogSettings(OpenDialog);
|
InputHistories.ApplyFileDialogSettings(OpenDialog);
|
||||||
OpenDialog.Title:=lisChooseDelphiPackage;
|
OpenDialog.Title:=lisChooseDelphiPackage;
|
||||||
|
OpenDialog.Options:=OpenDialog.Options+[ofPathMustExist,ofFileMustExist];
|
||||||
OpenDialog.Filter:=lisDelphiPackage+' (*.dpk)|*.dpk|'+
|
OpenDialog.Filter:=lisDelphiPackage+' (*.dpk)|*.dpk|'+
|
||||||
dlgAllFiles+' ('+GetAllFilesMask+')|' + GetAllFilesMask;
|
dlgAllFiles+' ('+GetAllFilesMask+')|' + GetAllFilesMask;
|
||||||
if InputHistories.LastConvertDelphiPackage<>'' then begin
|
if InputHistories.LastConvertDelphiPackage<>'' then begin
|
||||||
|
Loading…
Reference in New Issue
Block a user