From 038e9511d1c35cfa3d6b25baae351ce78f58ef5d Mon Sep 17 00:00:00 2001 From: liuli Date: Fri, 30 May 2025 13:53:02 +0800 Subject: fix: env BOX64_EMULATED_LIBS triggers sigsegv (#2686) --- src/tools/env.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/tools/env.c b/src/tools/env.c index 7db6f015..08f823e9 100644 --- a/src/tools/env.c +++ b/src/tools/env.c @@ -188,7 +188,7 @@ static void applyCustomRules() snprintf(pathname, sizeof(pathname), "/tmp/perf-%d.map", getpid()); SET_BOX64ENV(dynarec_perf_map_fd, open(pathname, O_CREAT | O_RDWR | O_APPEND, S_IRUSR | S_IWUSR)); } - if (box64env.emulated_libs) { + if (box64env.emulated_libs && my_context) { AppendList(&my_context->box64_emulated_libs, box64env.emulated_libs, 0); } if (!box64env.libgl) { -- cgit 1.4.1