about summary refs log tree commit diff stats
path: root/src/tools/env.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/env.c')
-rw-r--r--src/tools/env.c2
1 files changed, 1 insertions, 1 deletions
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) {