JitInterface: Fix null checking in GetProfileResults

Technically a null pointer dereference can occur here.
This commit is contained in:
Lioncash 2015-08-14 18:51:50 -04:00
parent 3bc5505272
commit 8db43501d5

View File

@ -133,15 +133,15 @@ namespace JitInterface
void GetProfileResults(ProfileStats* prof_stats)
{
// Can't really do this with no jit core available
if (!jit)
return;
prof_stats->cost_sum = 0;
prof_stats->timecost_sum = 0;
prof_stats->block_stats.clear();
prof_stats->block_stats.reserve(jit->GetBlockCache()->GetNumBlocks());
// Can't really do this with no jit core available
if (!jit)
return;
Core::EState old_state = Core::GetState();
if (old_state == Core::CORE_RUN)
Core::SetState(Core::CORE_PAUSE);