Parcourir la source

* fix crashes when searching symbols

peter il y a 22 ans
Parent
commit
c466e75da1
2 fichiers modifiés avec 11 ajouts et 3 suppressions
  1. 5 1
      compiler/symsym.pas
  2. 6 2
      compiler/symtable.pas

+ 5 - 1
compiler/symsym.pas

@@ -592,6 +592,7 @@ implementation
         { private symbols are allowed when we are in the same
           module as they are defined }
         if (sp_private in symoptions) and
+           assigned(owner.defowner) and
            (owner.defowner.owner.symtabletype in [globalsymtable,staticsymtable]) and
            (owner.defowner.owner.unitid<>0) then
           exit;
@@ -2519,7 +2520,10 @@ implementation
 end.
 {
   $Log$
-  Revision 1.84  2002-12-20 16:02:22  peter
+  Revision 1.85  2002-12-27 18:07:44  peter
+    * fix crashes when searching symbols
+
+  Revision 1.84  2002/12/20 16:02:22  peter
     * fix stupid copy&paste bug in binary operator search
 
   Revision 1.83  2002/12/16 22:08:31  peter

+ 6 - 2
compiler/symtable.pas

@@ -2057,7 +2057,8 @@ implementation
            need to use the scope of that class. This is a trick
            that can be used to access protected members in other
            units. At least kylix supports it this way (PFV) }
-         if (classh.owner.symtabletype in [globalsymtable,staticsymtable]) and
+         if assigned(classh) and
+            (classh.owner.symtabletype in [globalsymtable,staticsymtable]) and
             (classh.owner.unitid=0) then
            topclassh:=classh
          else
@@ -2359,7 +2360,10 @@ implementation
 end.
 {
   $Log$
-  Revision 1.87  2002-12-25 01:26:56  peter
+  Revision 1.88  2002-12-27 18:07:45  peter
+    * fix crashes when searching symbols
+
+  Revision 1.87  2002/12/25 01:26:56  peter
     * duplicate procsym-unitsym fix
 
   Revision 1.86  2002/12/21 13:07:34  peter