BugFix: null jstring

This commit is contained in:
xiaozhou233 committed 2026-03-30 19:03:10 +08:00
1 parent 6350bfb0ec
commit d6d17aac35
1 file changed
+2 -2
+2 -2
View File
@@ -58,8 +58,8 @@ bool invoke_juiceagent_init(JNIEnv* env, const InjectionInfo& info) {
PLOGD << "Invoke args: " << args;
// Create Java string
LocalRef<jstring> jArgs(env, env->NewStringUTF(args.c_str()));
if (!jArgs.get() || check_and_clear_exception(env, "NewStringUTF")) {
jstring jArgs = env->NewStringUTF(args.c_str());
if (!jArgs || check_and_clear_exception(env, "NewStringUTF")) {
PLOGE << "Failed to create jstring";
return false;
}