[quake3-commits] r2059 - trunk/code/qcommon

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Sat Jun 25 05:05:57 EDT 2011


Author: thilo
Date: 2011-06-25 05:05:57 -0400 (Sat, 25 Jun 2011)
New Revision: 2059

Modified:
   trunk/code/qcommon/common.c
Log:
Add forced VM unloading to Com_Quit_f


Modified: trunk/code/qcommon/common.c
===================================================================
--- trunk/code/qcommon/common.c	2011-06-25 00:17:44 UTC (rev 2058)
+++ trunk/code/qcommon/common.c	2011-06-25 09:05:57 UTC (rev 2059)
@@ -362,8 +362,14 @@
 	// don't try to shutdown if we are in a recursive error
 	char *p = Cmd_Args( );
 	if ( !com_errorEntered ) {
+		// Some VMs might execute "quit" command directly,
+		// which would trigger an unload of active VM error.
+		// Sys_Quit will kill this process anyways, so
+		// a corrupt call stack makes no difference
+		VM_Forced_Unload_Start();
 		SV_Shutdown (p[0] ? p : "Server quit");
 		CL_Shutdown (p[0] ? p : "Client quit", qtrue);
+		VM_Forced_Unload_Done();
 		Com_Shutdown ();
 		FS_Shutdown(qtrue);
 	}



More information about the quake3-commits mailing list