]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - menu.c
Added colored string support to centerprint.
[xonotic/darkplaces.git] / menu.c
diff --git a/menu.c b/menu.c
index 337328aecfb65b0af8c17c298b00c740df1b2c13..bf03a1192b25a657c8748486d258f2d3858ad9bf 100644 (file)
--- a/menu.c
+++ b/menu.c
@@ -4612,6 +4612,7 @@ void MR_SetRouting (qboolean forceold);
 
 void MP_Error(const char *format, ...)
 {
+       static qboolean processingError = false;
        char errorstring[4096];
        va_list argptr;
 
@@ -4620,7 +4621,13 @@ void MP_Error(const char *format, ...)
        va_end (argptr);
        Con_Printf( "Menu_Error: %s\n", errorstring );
 
-       PRVM_Crash();
+       if( !processingError ) {
+               processingError = true;
+               PRVM_Crash();
+               processingError = false;
+       } else {
+               Con_Printf( "Menu_Error: Recursive call to MP_Error (from PRVM_Crash)!\n" );
+       }
 
        // fall back to the normal menu