diff options
author | Keith Seitz <keiths@redhat.com> | 2001-10-10 17:01:52 +0000 |
---|---|---|
committer | Keith Seitz <keiths@redhat.com> | 2001-10-10 17:01:52 +0000 |
commit | 4abb499edbac34276f74c5244da30faefcc81843 (patch) | |
tree | 858e09dd20565ca461989f8fedcb33ec9b79c745 /gdb/varobj.c | |
parent | 08da05b004779169c90558b82fe2050d2da5342f (diff) | |
download | gdb-4abb499edbac34276f74c5244da30faefcc81843.zip gdb-4abb499edbac34276f74c5244da30faefcc81843.tar.gz gdb-4abb499edbac34276f74c5244da30faefcc81843.tar.bz2 |
* varobj.c (cplus_value_of_child): Deal with a failure
to dereference a pointer object.
Diffstat (limited to 'gdb/varobj.c')
-rw-r--r-- | gdb/varobj.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gdb/varobj.c b/gdb/varobj.c index c3a159b..ef2499d 100644 --- a/gdb/varobj.c +++ b/gdb/varobj.c @@ -2313,7 +2313,10 @@ cplus_value_of_child (struct varobj *parent, int index) if (TYPE_CODE (VALUE_TYPE (parent->value)) == TYPE_CODE_PTR || TYPE_CODE (VALUE_TYPE (parent->value)) == TYPE_CODE_REF) - gdb_value_ind (parent->value, &temp); + { + if (!gdb_value_ind (parent->value, &temp)) + return NULL; + } else temp = parent->value; |