Fix some "might be null" warnings.

This commit is contained in:
Unknown W. Brackets committed 2012-12-21 16:25:05 -08:00
1 parent ec753a3575
commit 66e942c545
3 files changed
+15 -6

No files matched your search

+7 -3
View File
@@ -845,7 +845,7 @@ void __KernelReSchedule(bool doCallbacks, const char *reason)
thread->isProcessingCallbacks = doCallbacks;
}
__KernelReSchedule(reason);
if (doCallbacks && thread == currentThread) {
if (doCallbacks && thread != NULL && thread == currentThread) {
if (thread->isRunning()) {
thread->isProcessingCallbacks = false;
}
@@ -1833,8 +1833,12 @@ void __KernelCallAddress(Thread *thread, u32 entryPoint, Action *afterAction, bo
}
if (!called) {
DEBUG_LOG(HLE, "Making mipscall pending on thread");
thread->pendingMipsCalls.push_back(callId);
if (thread) {
DEBUG_LOG(HLE, "Making mipscall pending on thread");
thread->pendingMipsCalls.push_back(callId);
} else {
WARN_LOG(HLE, "Ignoring mispcall on NULL/deleted thread");
}
}
}