aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/lang.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/java/lang.c')
-rw-r--r--gcc/java/lang.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/java/lang.c b/gcc/java/lang.c
index 7f0b09d..b64e4ea 100644
--- a/gcc/java/lang.c
+++ b/gcc/java/lang.c
@@ -489,6 +489,7 @@ java_print_error_function (diagnostic_context *context ATTRIBUTE_UNUSED,
return;
if (current_function_decl != NULL
+ && DECL_CONTEXT (current_function_decl) != NULL
&& DECL_CONTEXT (current_function_decl) != last_error_function_context)
{
if (file)