aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/p-lang.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 1abc0df..2a60376 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2020-03-08 Pierre Muller <muller@ics.u-strasbg.fr>
+
+ * p-lang.c (is_pascal_string_type): Check that TYPE arg is non NULL.
+
2010-03-08 Jan Kratochvil <jan.kratochvil@redhat.com>
Hui Zhu <teawater@gmail.com>
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. */