GBA: Fix crash if GBALog is called with a null context

This commit is contained in:
Jeffrey Pfau 2015-03-09 21:16:41 -07:00
parent 53a17bc96f
commit ad10b5dedf
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}