summaryrefslogtreecommitdiff
path: root/gdb/p-lang.c
diff options
context:
space:
mode:
authorPierre Muller <muller@ics.u-strasbg.fr>2010-03-08 16:55:16 +0000
committerPierre Muller <muller@ics.u-strasbg.fr>2010-03-08 16:55:16 +0000
commitbd85a9d820dcb326df5b85fb1ee62041281a9655 (patch)
treedf598d044403268389777b6165ad114aaa3e8667 /gdb/p-lang.c
parentd71b51a27494b7b9a4355046d982523b400db61f (diff)
downloadgdb-bd85a9d820dcb326df5b85fb1ee62041281a9655.tar.gz
* 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 c768d1bec3d..0db99a4aa92 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. */