diff --git a/test/unit_test.c b/test/unit_test.c index 2b432b14..1382af85 100644 --- a/test/unit_test.c +++ b/test/unit_test.c @@ -1920,8 +1920,10 @@ static void test_str(void) { } static void fn1(struct mg_connection *c, int ev, void *ev_data, void *fn_data) { - if (ev == MG_EV_ERROR) + if (ev == MG_EV_ERROR) { + ASSERT(* (void **) fn_data == NULL); *(char **) fn_data = mg_mprintf("%s", (char *) ev_data); + } (void) c; }