summaryrefslogtreecommitdiffhomepage
path: root/src/external
diff options
context:
space:
mode:
Diffstat (limited to 'src/external')
-rw-r--r--src/external/jar_xm.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/external/jar_xm.h b/src/external/jar_xm.h
index 1839e619..bfd63ec0 100644
--- a/src/external/jar_xm.h
+++ b/src/external/jar_xm.h
@@ -696,7 +696,9 @@ int jar_xm_create_context_safe(jar_xm_context_t** ctxp, const char* moddata, siz
}
void jar_xm_free_context(jar_xm_context_t* ctx) {
- JARXM_FREE(ctx->allocated_memory);
+ if (ctx != NULL) {
+ JARXM_FREE(ctx->allocated_memory);
+ }
}
void jar_xm_set_max_loop_count(jar_xm_context_t* ctx, uint8_t loopcnt) {