2007-07-24 Michael Snyder * ax-gdb.c (find_field): Guard against null ptr. Index: ax-gdb.c =================================================================== RCS file: /cvs/src/src/gdb/ax-gdb.c,v retrieving revision 1.34 diff -p -r1.34 ax-gdb.c *** ax-gdb.c 13 Jun 2007 17:11:09 -0000 1.34 --- ax-gdb.c 24 Jul 2007 20:18:36 -0000 *************** find_field (struct type *type, char *nam *** 1172,1183 **** { char *this_name = TYPE_FIELD_NAME (type, i); ! if (this_name && strcmp (name, this_name) == 0) ! return i; ! if (this_name[0] == '\0') ! internal_error (__FILE__, __LINE__, ! _("find_field: anonymous unions not supported")); } error (_("Couldn't find member named `%s' in struct/union `%s'"), --- 1172,1186 ---- { char *this_name = TYPE_FIELD_NAME (type, i); ! if (this_name) ! { ! if (strcmp (name, this_name) == 0) ! return i; ! if (this_name[0] == '\0') ! internal_error (__FILE__, __LINE__, ! _("find_field: anonymous unions not supported")); ! } } error (_("Couldn't find member named `%s' in struct/union `%s'"),