mirror of
https://github.com/LSPosed/LSPlant.git
synced 2025-05-04 20:42:02 +08:00
fix infinity loop
This commit is contained in:
parent
c5b2c550d3
commit
0d144a0881
@ -1032,8 +1032,8 @@ class JObjectArrayElement {
|
||||
friend class ScopedLocalRef<jobjectArray>;
|
||||
|
||||
auto obtain() {
|
||||
if (i_ < 0 || i_ >= size_) return JObjectArrayElement(env_, array_, i_, ScopedLocalRef<jobject>{nullptr});
|
||||
return JObjectArrayElement(env_, array_, i_, JNI_SafeInvoke(env_, &JNIEnv::GetObjectArrayElement, array_, i_));
|
||||
if (i_ < 0 || i_ >= size_) ScopedLocalRef<jobject>{nullptr};
|
||||
return JNI_SafeInvoke(env_, &JNIEnv::GetObjectArrayElement, array_, i_);
|
||||
}
|
||||
|
||||
explicit JObjectArrayElement(JNIEnv * env, jobjectArray array, int i, size_t size_) :
|
||||
@ -1077,7 +1077,7 @@ public:
|
||||
}
|
||||
|
||||
JObjectArrayElement& operator=(const JObjectArrayElement& s) {
|
||||
item_.reset(env_->NewLocalRef(s.get()));
|
||||
item_ = s.item_.clone();
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user