瀏覽代碼

* bug on errors (file used after dispose !) fixed

pierre 27 年之前
父節點
當前提交
6e816712fc
共有 2 個文件被更改,包括 14 次插入3 次删除
  1. 9 1
      compiler/files.pas
  2. 5 2
      compiler/verbose.pas

+ 9 - 1
compiler/files.pas

@@ -956,14 +956,17 @@ unit files;
          dispose(map);
         if assigned(ppufile) then
          dispose(ppufile,done);
+        ppufile:=nil;
         if assigned(imports) then
          dispose(imports,done);
+        imports:=nil;
 {$ifndef VER0_99_8}
         if assigned(scanner) then
           pscannerfile(scanner)^.invalid:=true;
 {$endif}
         if assigned(sourcefiles) then
          dispose(sourcefiles,done);
+        sourcefiles:=nil;
         used_units.done;
         linkofiles.done;
         linkstaticlibs.done;
@@ -981,8 +984,10 @@ unit files;
 {$ifndef VER0_99_8}
         if assigned(globalsymtable) then
           dispose(punitsymtable(globalsymtable),done);
+        globalsymtable:=nil;
         if assigned(localsymtable) then
           dispose(punitsymtable(localsymtable),done);
+        localsymtable:=nil;
 {$endif}
         inherited done;
       end;
@@ -1027,7 +1032,10 @@ unit files;
 end.
 {
   $Log$
-  Revision 1.70  1998-11-03 11:33:14  peter
+  Revision 1.71  1998-11-06 09:45:40  pierre
+    * bug on errors (file used after dispose !) fixed
+
+  Revision 1.70  1998/11/03 11:33:14  peter
     + search_unit arg to only search for sources
 
   Revision 1.69  1998/10/29 11:35:44  florian

+ 5 - 2
compiler/verbose.pas

@@ -249,7 +249,7 @@ begin
 { fix status }
   status.currentline:=aktfilepos.line;
   status.currentcolumn:=aktfilepos.column;
-  if assigned(current_module) and
+  if assigned(current_module) and assigned(current_module^.sourcefiles) and
      ((current_module^.unit_index<>lastmoduleidx) or
       (aktfilepos.fileindex<>lastfileidx)) then
    begin
@@ -428,7 +428,10 @@ end.
 
 {
   $Log$
-  Revision 1.27  1998-10-28 18:26:24  pierre
+  Revision 1.28  1998-11-06 09:45:41  pierre
+    * bug on errors (file used after dispose !) fixed
+
+  Revision 1.27  1998/10/28 18:26:24  pierre
    * removed some erros after other errors (introduced by useexcept)
    * stabs works again correctly (for how long !)