From 73bad6d9161dff0a1632661a8f1135673adb0377 Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Tue, 2 Jun 2026 17:58:14 -0700 Subject: [PATCH] midiemu: use a valid report handler initializer mt32emu_create_context() expects a report-handler interface value, not a casted NULL pointer. Initialize an empty handler object and pass that to the mt32emu API. --- midiemu.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/midiemu.cpp b/midiemu.cpp index 98ae5711..181fbaab 100644 --- a/midiemu.cpp +++ b/midiemu.cpp @@ -238,7 +238,8 @@ int midi_emu_open(const TCHAR *id) } const char *s = mt32emu_get_library_version_string(); write_log("mt32emu version: %s\n", s); - mt32context = mt32emu_create_context((mt32emu_report_handler_i)NULL, NULL); + mt32emu_report_handler_i report_handler = { NULL }; + mt32context = mt32emu_create_context(report_handler, NULL); if (!mt32context) { write_log("mt32emu_create_context() failed\n"); return 0; -- 2.47.3