diff options
author | Michael Snyder <msnyder@vmware.com> | 2007-08-04 02:50:16 +0000 |
---|---|---|
committer | Michael Snyder <msnyder@vmware.com> | 2007-08-04 02:50:16 +0000 |
commit | 03b4bca2d7c342aecb50a5874837aa4ef750460a (patch) | |
tree | 2dd8fabd957b2bebe4d28f064f73e19645c6b305 /gdb/jv-lang.c | |
parent | 17e1855042871e2554a98d2a5661e60f030bfec7 (diff) | |
download | gdb-03b4bca2d7c342aecb50a5874837aa4ef750460a.zip gdb-03b4bca2d7c342aecb50a5874837aa4ef750460a.tar.gz gdb-03b4bca2d7c342aecb50a5874837aa4ef750460a.tar.bz2 |
2007-08-03 Michael Snyder <msnyder@access-company.com>
* jv-lang.c (java_link_class_type): Guard against NULL.
Diffstat (limited to 'gdb/jv-lang.c')
-rw-r--r-- | gdb/jv-lang.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gdb/jv-lang.c b/gdb/jv-lang.c index fb2b419..bed3487b 100644 --- a/gdb/jv-lang.c +++ b/gdb/jv-lang.c @@ -39,6 +39,7 @@ #include "demangle.h" #include "dictionary.h" #include <ctype.h> +#include "gdb_assert.h" struct type *java_int_type; struct type *java_byte_type; @@ -351,13 +352,14 @@ java_link_class_type (struct type *type, struct value *clas) struct objfile *objfile = get_dynamics_objfile (); struct type *tsuper; + gdb_assert (name != NULL); unqualified_name = strrchr (name, '.'); if (unqualified_name == NULL) unqualified_name = name; temp = clas; temp = value_struct_elt (&temp, NULL, "superclass", NULL, "structure"); - if (name != NULL && strcmp (name, "java.lang.Object") == 0) + if (strcmp (name, "java.lang.Object") == 0) { tsuper = get_java_object_type (); if (tsuper && TYPE_CODE (tsuper) == TYPE_CODE_PTR) |