diff options
Diffstat (limited to 'Software/Visual_Studio/Tango.Core/Threading')
| -rw-r--r-- | Software/Visual_Studio/Tango.Core/Threading/ActionTimer.cs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Software/Visual_Studio/Tango.Core/Threading/ActionTimer.cs b/Software/Visual_Studio/Tango.Core/Threading/ActionTimer.cs index f16e7739c..eda115047 100644 --- a/Software/Visual_Studio/Tango.Core/Threading/ActionTimer.cs +++ b/Software/Visual_Studio/Tango.Core/Threading/ActionTimer.cs @@ -33,9 +33,12 @@ namespace Tango.Core.Threading /// <param name="action">The action.</param> public void ResetReplace(Action action) { - _timer.Stop(); - _action = action; - _timer.Start(); + if (_timer != null) + { + _timer.Stop(); + _action = action; + _timer.Start(); + } } private void _timer_Elapsed(object sender, ElapsedEventArgs e) |
