From: Pierre Muller Date: Wed, 10 Mar 2010 22:31:48 +0000 (+0000) Subject: * p-lang.c (is_pascal_string_type): Check that TYPE arg is non NULL. X-Git-Tag: gdb_7_1-2010-03-18-release~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=53b7ec57b6be8487dd37ff457c97eb2259716d88;p=thirdparty%2Fbinutils-gdb.git * p-lang.c (is_pascal_string_type): Check that TYPE arg is non NULL. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index b8a45306bc9..991d3c881a6 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2010-03-10 Pierre Muller + + * p-lang.c (is_pascal_string_type): Check that TYPE arg is non NULL. + 2010-03-07 Joel Brobecker * remote.c (remote_get_ada_task_ptid): New function. diff --git a/gdb/p-lang.c b/gdb/p-lang.c index c768d1bec3d..415cd994566 100644 --- a/gdb/p-lang.c +++ b/gdb/p-lang.c @@ -101,7 +101,7 @@ is_pascal_string_type (struct type *type,int *length_pos, struct type **char_type, char **arrayname) { - if (TYPE_CODE (type) == TYPE_CODE_STRUCT) + if (type != NULL && TYPE_CODE (type) == TYPE_CODE_STRUCT) { /* Old Borland type pascal strings from Free Pascal Compiler. */ /* Two fields: length and st. */