mirror of https://github.com/mgba-emu/mgba.git
GBA: Fix crash if GBALog is called with a null context
This commit is contained in:
parent
53a17bc96f
commit
ad10b5dedf
|
@ -550,7 +550,7 @@ static void _GBAVLog(struct GBA* gba, enum GBALogLevel level, const char* format
|
|||
MutexUnlock(&threadContext->stateMutex);
|
||||
}
|
||||
}
|
||||
if (gba->logHandler) {
|
||||
if (gba && gba->logHandler) {
|
||||
gba->logHandler(threadContext, level, format, args);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue