mirror of https://github.com/mgba-emu/mgba.git
Ensure rewind buffer is null if we are not enabling rewinding
This commit is contained in:
parent
48a3522fbc
commit
c8b04a2ca5
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue