lib-xref.adb: Add error defense.

2008-08-01  Robert Dewar  <dewar@adacore.com>

	* lib-xref.adb: Add error defense.

From-SVN: r138507
This commit is contained in:
Robert Dewar 2008-08-01 12:33:29 +02:00 committed by Arnaud Charlet
parent 7406fc154b
commit 30dc431315

View File

@ -1834,7 +1834,11 @@ package body Lib.Xref is
Par : Node_Id;
begin
if Ekind (Scope (E)) /= E_Generic_Package then
-- The Present check here is an error defense
if Present (Scope (E))
and then Ekind (Scope (E)) /= E_Generic_Package
then
return False;
end if;