diff options
author | Jeffrey A Law <law@cygnus.com> | 1997-12-24 21:33:48 +0000 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1997-12-24 14:33:48 -0700 |
commit | 280e521f029df248a105d1bd90c251ef26080f09 (patch) | |
tree | 01c9d38186df06e10d88e40518dd7bcefaf760a2 /gcc/tree.c | |
parent | 95b8c0c8cb3a66b01830f7838700184da3f3238f (diff) | |
download | gcc-280e521f029df248a105d1bd90c251ef26080f09.zip gcc-280e521f029df248a105d1bd90c251ef26080f09.tar.gz gcc-280e521f029df248a105d1bd90c251ef26080f09.tar.bz2 |
tree.c (restore_tree_status): Do not dereference a null pointer.
* tree.c (restore_tree_status): Do not dereference a null pointer.
Brought over from devo. SHould fix 921215-1.c compilation failures.
From-SVN: r17225
Diffstat (limited to 'gcc/tree.c')
-rw-r--r-- | gcc/tree.c | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -445,13 +445,16 @@ restore_tree_status (p, context) { struct simple_obstack_stack *current, **p = &toplev_inline_obstacks; - while ((*p)->obstack != function_maybepermanent_obstack) - p = &((*p)->next); - current = *p; - *p = current->next; + if ((*p) != NULL) + { + while ((*p)->obstack != function_maybepermanent_obstack) + p = &((*p)->next); + current = *p; + *p = current->next; - current->next = extra_inline_obstacks; - extra_inline_obstacks = current; + current->next = extra_inline_obstacks; + extra_inline_obstacks = current; + } } obstack_free (function_obstack, 0); |