diff --git a/vm/os-windows.c b/vm/os-windows.c index 522607e4c5..71479f2eb0 100644 --- a/vm/os-windows.c +++ b/vm/os-windows.c @@ -230,7 +230,9 @@ long getpagesize (void) { static void exception_handler(PEXCEPTION_RECORD rec, void *frame, void *ctx, void *dispatch) { - memory_protection_error((void*)rec->ExceptionInformation[1],SIGSEGV); + memory_protection_error( + rec->NumberParameters >= 2 ? (void*)rec->ExceptionInformation[1] : 0, + SIGSEGV); } void platform_run(void)