diff options
author | Vladimir Prus <vladimir@codesourcery.com> | 2007-11-07 20:06:29 +0000 |
---|---|---|
committer | Vladimir Prus <vladimir@codesourcery.com> | 2007-11-07 20:06:29 +0000 |
commit | 214270abf389bb2aa4584423353a7da2a1e6b463 (patch) | |
tree | 8e980f439b9001a60df7f261c792c5268fdfca9b /gdb/varobj.c | |
parent | 91ea499d4ae67d29f4ef3aefc3335224a2837254 (diff) | |
download | gdb-214270abf389bb2aa4584423353a7da2a1e6b463.zip gdb-214270abf389bb2aa4584423353a7da2a1e6b463.tar.gz gdb-214270abf389bb2aa4584423353a7da2a1e6b463.tar.bz2 |
Fix crash when a variable object being deleted
has any of its children deleted previously.
* varobj.c (delete_variable_1): Don't recurse
into deleted children.
Diffstat (limited to 'gdb/varobj.c')
-rw-r--r-- | gdb/varobj.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gdb/varobj.c b/gdb/varobj.c index d6125c6..fb1fd1d 100644 --- a/gdb/varobj.c +++ b/gdb/varobj.c @@ -1292,6 +1292,8 @@ delete_variable_1 (struct cpstack **resultp, int *delcountp, for (i = 0; i < VEC_length (varobj_p, var->children); ++i) { varobj_p child = VEC_index (varobj_p, var->children, i); + if (!child) + continue; if (!remove_from_parent_p) child->parent = NULL; delete_variable_1 (resultp, delcountp, child, 0, only_children_p); |