2007-08-02 Michael Snyder <msnyder@access-company.com>
authorMichael Snyder <msnyder@vmware.com>
Thu, 2 Aug 2007 21:01:37 +0000 (21:01 +0000)
committerMichael Snyder <msnyder@vmware.com>
Thu, 2 Aug 2007 21:01:37 +0000 (21:01 +0000)
* gdbtypes.c (check_typedef): Guard NULL.

gdb/ChangeLog
gdb/gdbtypes.c

index 7dba67c..d462a31 100644 (file)
@@ -1,3 +1,7 @@
+2007-08-02  Michael Snyder  <msnyder@access-company.com>
+
+       * gdbtypes.c (check_typedef): Guard NULL.
+
 2007-08-01  Michael Snyder  <msnyder@access-company.com>
 
        * cli/cli-decode.c (lookup_cmd): Check for null earlier, to 
index c45dfd4..994178d 100644 (file)
@@ -1318,6 +1318,8 @@ check_typedef (struct type *type)
   struct type *orig_type = type;
   int is_const, is_volatile;
 
+  gdb_assert (type);
+
   while (TYPE_CODE (type) == TYPE_CODE_TYPEDEF)
     {
       if (!TYPE_TARGET_TYPE (type))