From 6d307763fb4e0224a97d3f44150b8e07c0943af9 Mon Sep 17 00:00:00 2001 From: Michael Snyder Date: Tue, 14 Aug 2007 18:32:45 +0000 Subject: [PATCH] 2007-08-14 Michael Snyder * ada-lang.c (possible_user_operator_p): Guard against NULL. --- gdb/ChangeLog | 2 ++ gdb/ada-lang.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index dc4596d..298147e 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,7 @@ 2007-08-14 Michael Snyder + * ada-lang.c (possible_user_operator_p): Guard against NULL. + * varobj.c (cplus_describe_child): Guard against null. Use "NULL" instead of "0" to initialize pointers. diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index 58d820d..0a27ba0 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -3536,7 +3536,7 @@ possible_user_operator_p (enum exp_opcode op, struct value *args[]) ((TYPE_CODE (type0) != TYPE_CODE_ARRAY && (TYPE_CODE (type0) != TYPE_CODE_PTR || TYPE_CODE (TYPE_TARGET_TYPE (type0)) != TYPE_CODE_ARRAY)) - || (TYPE_CODE (type1) != TYPE_CODE_ARRAY + || (type1 != NULL && TYPE_CODE (type1) != TYPE_CODE_ARRAY && (TYPE_CODE (type1) != TYPE_CODE_PTR || (TYPE_CODE (TYPE_TARGET_TYPE (type1)) != TYPE_CODE_ARRAY)))); -- 2.7.4