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 7dba67cffdb803592cc29a7d8d07239d85855faa..d462a310cd6bce784e931e9165c1cad0dac0f060 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 c45dfd44e6b09118ec798ed5bc79ec97fee781f2..994178d5179fb3cf3fe2a87f48ef48b9d320fbdf 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))