From f72d4b774a268b7ff630bfed96698cae18464d21 Mon Sep 17 00:00:00 2001 From: Pierre Muller Date: Mon, 8 Mar 2010 16:55:17 +0000 Subject: * p-lang.c (is_pascal_string_type): Check that TYPE arg is non NULL. --- gdb/p-lang.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdb/p-lang.c') diff --git a/gdb/p-lang.c b/gdb/p-lang.c index c768d1b..0db99a4 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. */ -- cgit v1.1