]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
midiemu: use a valid report handler initializer
authorStefan Reinauer <stefan.reinauer@coreboot.org>
Wed, 3 Jun 2026 00:58:14 +0000 (17:58 -0700)
committerStefan Reinauer <stefan.reinauer@coreboot.org>
Wed, 3 Jun 2026 00:58:14 +0000 (17:58 -0700)
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

index 98ae5711658ad883c3da62bcd55e7519525f07e6..181fbaab1ee98d550d7dec2c9d61053ce9c01243 100644 (file)
@@ -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;