Oops, avoid a crash on a bad HLE func.

In the debug stats area.
This commit is contained in:
Unknown W. Brackets 2013-11-02 13:48:35 -07:00
parent 5328e213a6
commit dfbfed7534

View File

@ -507,20 +507,21 @@ void CallSyscall(MIPSOpcode op)
start = time_now_d();
}
const HLEFunction *info = GetSyscallInfo(op);
if (info)
if (!info)
return;
if (info->func)
{
if (info->func)
{
if (op == GetSyscallOp("FakeSysCalls", NID_IDLE))
info->func();
else if (info->flags != 0)
CallSyscallWithFlags(info);
else
CallSyscallWithoutFlags(info);
}
if (op == GetSyscallOp("FakeSysCalls", NID_IDLE))
info->func();
else if (info->flags != 0)
CallSyscallWithFlags(info);
else
ERROR_LOG_REPORT(HLE, "Unimplemented HLE function %s", info->name);
CallSyscallWithoutFlags(info);
}
else
ERROR_LOG_REPORT(HLE, "Unimplemented HLE function %s", info->name);
if (g_Config.bShowDebugStats)
{
time_update();