add null check to PeriodicTimer

This commit is contained in:
Luke Pulverenti
2016-01-28 22:42:03 -05:00
parent 3510ef3d2b
commit 3268de0edf
2 changed files with 6 additions and 1 deletions

View File

@@ -14,6 +14,11 @@ namespace MediaBrowser.Common.Threading
public PeriodicTimer(Action<object> callback, object state, TimeSpan dueTime, TimeSpan period)
{
if (callback == null)
{
throw new ArgumentNullException("callback");
}
Callback = callback;
_period = period;
_state = state;