Speculative fix for crash with null values in TimedUpdate.TickTB

This commit is contained in:
baldurk
2014-08-19 22:45:29 +01:00
parent fc347a0235
commit b38e7f20d3
+8 -3
View File
@@ -45,14 +45,19 @@ namespace renderdocui.Code
}
private int m_Rate;
private UpdateMethod m_Update;
private UpdateMethod m_Update = null;
private System.Threading.Timer m_CameraTick = null;
private static void TickCB(object state)
{
if (!(state is TimedUpdate)) return;
var me = (TimedUpdate)state;
me.m_Update();
me.m_CameraTick.Change(me.m_Rate, System.Threading.Timeout.Infinite);
if (me == null) return;
if (me.m_Update != null) me.m_Update();
if (me.m_CameraTick != null) me.m_CameraTick.Change(me.m_Rate, System.Threading.Timeout.Infinite);
}
}