fixed access violation when doing "Add editor file to project" if there is no editor file (issue #1258)

git-svn-id: trunk@7958 -
This commit is contained in:
vincents 2005-10-12 07:46:55 +00:00
parent cec693884a
commit 099bfa8b1e

View File

@ -6510,8 +6510,8 @@ var
s, ShortUnitName: string;
begin
Result:=mrCancel;
BeginCodeTool(ActiveSourceEditor,ActiveUnitInfo,[]);
if ActiveUnitInfo<>nil then begin
if BeginCodeTool(ActiveSourceEditor,ActiveUnitInfo,[])
and (ActiveUnitInfo<>nil) then begin
if ActiveUnitInfo.IsPartOfProject=false then begin
if not ActiveUnitInfo.IsVirtual then
s:='"'+ActiveUnitInfo.Filename+'"'