]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* p-lang.c (is_pascal_string_type): Check that TYPE arg is non NULL.
authorPierre Muller <muller@sourceware.org>
Mon, 8 Mar 2010 16:55:17 +0000 (16:55 +0000)
committerPierre Muller <muller@sourceware.org>
Mon, 8 Mar 2010 16:55:17 +0000 (16:55 +0000)
gdb/ChangeLog
gdb/p-lang.c

index 1abc0df5712d55cd00a969117c24a1e167813dc3..2a6037624731711841bee4b3401ba3d281e810e1 100644 (file)
@@ -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>
 
index c768d1bec3dc3ed6ed2cbfbe1499d085f9e8c7db..0db99a4aa92b346a269c7945c0d753f59654c60b 100644 (file)
@@ -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.  */