Corrected the error message.

This commit is contained in:
MohitMaliFtechiz 2025-01-27 16:34:41 +05:30
parent c5de943905
commit d7c38990df

View File

@ -110,7 +110,7 @@ shared_ptr<T> getPtr(JNIEnv* env, jobject thisObj, const char* handleName = "nat
jfieldID fidNumber = env->GetFieldID(thisClass, handleName, "J"); jfieldID fidNumber = env->GetFieldID(thisClass, handleName, "J");
auto handle = reinterpret_cast<shared_ptr<T>*>(env->GetLongField(thisObj, fidNumber)); auto handle = reinterpret_cast<shared_ptr<T>*>(env->GetLongField(thisObj, fidNumber));
if (handle == nullptr) { if (handle == nullptr) {
throw NativeHandleDisposedException("The native object is already has been disposed"); throw NativeHandleDisposedException("The native object has already been disposed");
} }
return *handle; return *handle;
} }