aboutsummaryrefslogtreecommitdiff
path: root/gdb/p-lang.c
diff options
context:
space:
mode:
authorPierre Muller <muller@sourceware.org>2010-03-08 16:55:17 +0000
committerPierre Muller <muller@sourceware.org>2010-03-08 16:55:17 +0000
commitf72d4b774a268b7ff630bfed96698cae18464d21 (patch)
tree7e9ac90b880aff39ce68c02782dc556d121e2366 /gdb/p-lang.c
parent40cf28aa1c07cb779f8f21991ee57f0b48296ad9 (diff)
downloadgdb-f72d4b774a268b7ff630bfed96698cae18464d21.zip
gdb-f72d4b774a268b7ff630bfed96698cae18464d21.tar.gz
gdb-f72d4b774a268b7ff630bfed96698cae18464d21.tar.bz2
* p-lang.c (is_pascal_string_type): Check that TYPE arg is non NULL.
Diffstat (limited to 'gdb/p-lang.c')
-rw-r--r--gdb/p-lang.c2
1 files changed, 1 insertions, 1 deletions
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. */