Check the parent context ( for not nil ) before using it : avoid an AV exception.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1011 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
inoussa
2009-11-16 09:25:37 +00:00
parent 2f31267ad0
commit d028fcba64

View File

@ -247,6 +247,7 @@ function TCustomXsdSchemaParser.FindNameSpace(
var
i : PtrInt;
ls : TStrings;
pc : IParserContext;
begin
AResult := '';
Result := False;
@ -258,8 +259,11 @@ begin
Break;
end;
end;
if not Result then
if not Result then begin
pc := GetParentContext();
if ( pc <> nil ) then
Result := GetParentContext().FindNameSpace(AShortName,AResult);
end;
end;
function TCustomXsdSchemaParser.FindShortNamesForNameSpace(const ANameSpace: string): TStrings;