From 1a19ebdd28f5ba5840d5e2d713098df7bcb13385 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Fri, 23 Jun 2023 11:39:36 +0800 Subject: [PATCH] Correctly check result of string lookup * src/android.c (android_wc_lookup_string): Check that GetStringChars returns non-NULL, not if it throws an exception. --- src/android.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/android.c b/src/android.c index d6a56dfe0b8..ff78e4c289a 100644 --- a/src/android.c +++ b/src/android.c @@ -5827,7 +5827,7 @@ android_wc_lookup_string (android_key_pressed_event *event, /* Now return this input method string. */ characters = (*android_java_env)->GetStringChars (android_java_env, string, NULL); - android_exception_check_1 (string); + android_exception_check_nonnull (characters, string); /* Figure out how big the string is. */ size = (*android_java_env)->GetStringLength (android_java_env, -- 2.39.2