1
0
forked from 0ad/0ad

avoid crash due to null pointer in profiler (triggered by returning from the root node)

This was SVN commit r8966.
This commit is contained in:
janwas 2011-02-21 09:41:11 +00:00
parent 8f59d52697
commit a155809447

View File

@ -653,7 +653,11 @@ void CProfileManager::StartScript( const char* name )
void CProfileManager::Stop()
{
if( current->Return() )
current = current->GetParent();
{
// (jw: for reasons unknown, current == root when called from main.cpp:293)
if(current != root)
current = current->GetParent();
}
}
void CProfileManager::Reset()