summaryrefslogtreecommitdiff
path: root/runtime/check_jni.cc
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/check_jni.cc')
-rw-r--r--runtime/check_jni.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/check_jni.cc b/runtime/check_jni.cc
index 0d5a805c8d..cfd0c007f1 100644
--- a/runtime/check_jni.cc
+++ b/runtime/check_jni.cc
@@ -179,7 +179,7 @@ class ScopedCheck {
// times, so using "java.lang.Thread" instead of "java/lang/Thread" might work in some
// circumstances, but this is incorrect.
void CheckClassName(const char* class_name) {
- if (!IsValidJniClassName(class_name)) {
+ if ((class_name == nullptr) || !IsValidJniClassName(class_name)) {
JniAbortF(function_name_,
"illegal class name '%s'\n"
" (should be of the form 'package/Class', [Lpackage/Class;' or '[[B')",