Introducing a new concept to Unix and Windows coders worldwide: Error checking.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1170 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Mark Olsen 2005-07-28 14:33:18 +00:00
parent 5f7f5e662e
commit a58cf9c17a
1 changed files with 11 additions and 8 deletions

View File

@ -1312,14 +1312,17 @@ void VARGS Menu_Abort (char *format, ...)
Con_Printf("Menu_Abort: %s\nShutting down menu.dat\n", string);
{
char *buffer;
int size = 1024*1024*8;
buffer = Z_Malloc(size);
menuprogs->save_ents(menuprogs, buffer, &size, 3);
COM_WriteFile("menucore.txt", buffer, size);
Z_Free(buffer);
}
{
char *buffer;
int size = 1024*1024*8;
buffer = Z_Malloc(size);
if (buffer)
{
menuprogs->save_ents(menuprogs, buffer, &size, 3);
COM_WriteFile("menucore.txt", buffer, size);
Z_Free(buffer);
}
}
MP_Shutdown();
}