aboutsummaryrefslogtreecommitdiff
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
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.
-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. */