1
0
mirror of https://github.com/MGislv/NekoX.git synced 2024-06-30 10:14:04 +00:00

Fix possible native crash?

This commit is contained in:
luvletter2333 2022-02-18 16:01:55 +08:00
parent 6512972f30
commit ab0c0ed4d8
No known key found for this signature in database
GPG Key ID: A26A8880836E1978

View File

@ -1081,6 +1081,9 @@ JNIEXPORT jint Java_org_telegram_messenger_Utilities_saveProgressiveJpeg(JNIEnv
return 0;
}
const char *pathStr = env->GetStringUTFChars(path, 0);
if (pathStr == NULL) {
return 0;
}
std::string filePath = std::string(pathStr);
if (pathStr != 0) {
env->ReleaseStringUTFChars(path, pathStr);