Ensure rewind buffer is null if we are not enabling rewinding

This commit is contained in:
Jeffrey Pfau 2014-01-28 06:52:46 -08:00
parent 48a3522fbc
commit c8b04a2ca5
1 changed files with 2 additions and 0 deletions

View File

@ -162,6 +162,8 @@ int GBAThreadStart(struct GBAThread* threadContext) {
threadContext->rewindBufferSize = 0; threadContext->rewindBufferSize = 0;
if (threadContext->rewindBufferCapacity) { if (threadContext->rewindBufferCapacity) {
threadContext->rewindBuffer = calloc(threadContext->rewindBufferCapacity, sizeof(void*)); threadContext->rewindBuffer = calloc(threadContext->rewindBufferCapacity, sizeof(void*));
} else {
threadContext->rewindBuffer = 0;
} }
MutexInit(&threadContext->stateMutex); MutexInit(&threadContext->stateMutex);