Whoops[exec_hooks]: do not null program unconditionally

This commit is contained in:
Maksim Belov 2025-01-05 19:11:30 +03:00 committed by Maksim Belov
parent 6d39ab2d49
commit aadb91dc98

View File

@ -63,7 +63,6 @@ static jint hooked_ProcessImpl_forkAndExec(JNIEnv *env, jobject process, jint mo
// Also add LD_LIBRARY_PATH and PATH for the lib in order to override the ones from the launcher, since // Also add LD_LIBRARY_PATH and PATH for the lib in order to override the ones from the launcher, since
// they may interfere with ffmpeg dependencies. // they may interfere with ffmpeg dependencies.
const char* ffmpeg_path = getenv("POJAV_FFMPEG_PATH"); const char* ffmpeg_path = getenv("POJAV_FFMPEG_PATH");
prog = NULL;
if(ffmpeg_path != NULL) { if(ffmpeg_path != NULL) {
replaceLibPathInEnvBlock(env, &envBlock, &envc, dirname(ffmpeg_path)); replaceLibPathInEnvBlock(env, &envBlock, &envc, dirname(ffmpeg_path));
prog = stringToBytes(env, ffmpeg_path); prog = stringToBytes(env, ffmpeg_path);