Fix possible crash
This commit is contained in:
parent
94f4a6f644
commit
2fc992ded9
@ -155,7 +155,7 @@ extern "C" void reset_network_body()
|
||||
{
|
||||
// In windows the rendering is paused when out focus, which pauses the
|
||||
// smooth timer
|
||||
if (World::getWorld() && RewindManager::isEnabled())
|
||||
if (World::getWorld() && RewindManager::exists())
|
||||
RewindManager::get()->resetSmoothNetworkBody();
|
||||
} // reset_network_body
|
||||
|
||||
|
@ -147,6 +147,12 @@ public:
|
||||
/** Returns if rewinding is enabled or not. */
|
||||
static bool isEnabled() { return m_enable_rewind_manager; }
|
||||
// ------------------------------------------------------------------------
|
||||
static bool exists()
|
||||
{
|
||||
ProcessType pt = STKProcess::getType();
|
||||
return m_rewind_manager[pt] != NULL;
|
||||
} // exists
|
||||
// ------------------------------------------------------------------------
|
||||
/** Returns the singleton. This function will not automatically create
|
||||
* the singleton. */
|
||||
static RewindManager *get()
|
||||
|
Loading…
Reference in New Issue
Block a user