Browse Source

* fixed crash with program name as a important unit name

peter 24 years ago
parent
commit
73a75d5d5c
1 changed files with 7 additions and 5 deletions
  1. 7 5
      compiler/pmodules.pas

+ 7 - 5
compiler/pmodules.pas

@@ -1458,12 +1458,8 @@ implementation
          { of the program                                             }
          st:=new(punitsymtable,init(staticsymtable,current_module.modulename^));
          current_module.localsymtable:=st;
-         symtablestack:=st;
          refsymtable:=st;
 
-         { necessary for browser }
-         loaded_units.insert(current_module);
-
          { load standard units (system,objpas,profile unit) }
          loaddefaultunits;
 
@@ -1474,6 +1470,9 @@ implementation
          if token=_USES then
            loadunits;
 
+         { necessary for browser }
+         loaded_units.insert(current_module);
+
 {$ifndef DONOTCHAINOPERATORS}
          pstoredsymtable(symtablestack)^.chainoperators;
 {$endif DONOTCHAINOPERATORS}
@@ -1626,7 +1625,10 @@ implementation
 end.
 {
   $Log$
-  Revision 1.20  2000-12-25 00:07:27  peter
+  Revision 1.21  2001-01-14 22:13:52  peter
+    * fixed crash with program name as a important unit name
+
+  Revision 1.20  2000/12/25 00:07:27  peter
     + new tlinkedlist class (merge of old tstringqueue,tcontainer and
       tlinkedlist objects)