mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-30 01:48:15 +03:00
Clean up all program close paths to use VVV_exit()
Wow, there are a lot of these. All of these exit paths now use VVV_exit() instead, which attempts to save unlock.vvv and settings.vvv, and also frees all resources so Valgrind is happy. This is a good thing, because previously unlock.vvv/settings.vvv wouldn't be written to if we decided to bail for a given reason.
This commit is contained in:
@@ -3,8 +3,8 @@
|
||||
#include <physfs.h> /* FIXME: Abstract to FileSystemUtils! */
|
||||
#include <SDL.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "Exit.h"
|
||||
#include "UtilityClass.h"
|
||||
|
||||
binaryBlob::binaryBlob()
|
||||
@@ -113,7 +113,7 @@ bool binaryBlob::unPackBinary(const char* name)
|
||||
m_memblocks[i] = (char*) SDL_malloc(m_headers[i].size);
|
||||
if (m_memblocks[i] == NULL)
|
||||
{
|
||||
exit(1); /* Oh god we're out of memory, just bail */
|
||||
VVV_exit(1); /* Oh god we're out of memory, just bail */
|
||||
}
|
||||
PHYSFS_readBytes(handle, m_memblocks[i], m_headers[i].size);
|
||||
offset += m_headers[i].size;
|
||||
|
||||
Reference in New Issue
Block a user