diff --git a/code/client/cl_ui.c b/code/client/cl_ui.c index 38441647..19223a32 100644 --- a/code/client/cl_ui.c +++ b/code/client/cl_ui.c @@ -1119,6 +1119,10 @@ void CL_InitUI( void ) { VM_Call( uivm, UI_INIT, (clc.state >= CA_AUTHORIZING && clc.state < CA_ACTIVE)); } else if (v != UI_API_VERSION) { + // Free uivm now, so UI_SHUTDOWN doesn't get called later. + VM_Free( uivm ); + uivm = NULL; + Com_Error( ERR_DROP, "User Interface is version %d, expected %d", v, UI_API_VERSION ); cls.uiStarted = qfalse; }