2002-09-10 Michael Snyder <msnyder@redhat.com>
authorMichael Snyder <msnyder@vmware.com>
Tue, 10 Sep 2002 23:45:26 +0000 (23:45 +0000)
committerMichael Snyder <msnyder@vmware.com>
Tue, 10 Sep 2002 23:45:26 +0000 (23:45 +0000)
* buildsym.c (finish_block): Protect against null pointer.

gdb/ChangeLog
gdb/buildsym.c

index d832ac6f12394405c32a86a72997295c676ec081..c69cf219df1ca11fbba3a75d6fc11ff560d558d7 100644 (file)
@@ -1,3 +1,7 @@
+2002-09-10  Michael Snyder  <msnyder@redhat.com>
+
+       * buildsym.c (finish_block): Protect against null pointer.
+
 2002-09-10  Andrew Cagney  <cagney@redhat.com>
 
        * infcmd.c (default_print_registers_info): Send all output to
index b1962dffeaeb88174e7408bdd0a83b09eb166c0e..9d9b4f74482b6e806e136857ac81f53d210f4f56 100644 (file)
@@ -422,7 +422,9 @@ finish_block (struct symbol *symbol, struct pending **listhead,
      start of this scope that don't have superblocks yet.  */
 
   opblock = NULL;
-  for (pblock = pending_blocks; pblock != old_blocks; pblock = pblock->next)
+  for (pblock = pending_blocks; 
+       pblock && pblock != old_blocks; 
+       pblock = pblock->next)
     {
       if (BLOCK_SUPERBLOCK (pblock->block) == NULL)
        {