diff --git a/src/Renci.SshNet/Abstractions/ThreadAbstraction.cs b/src/Renci.SshNet/Abstractions/ThreadAbstraction.cs index f1ed202a..fe6e3e21 100644 --- a/src/Renci.SshNet/Abstractions/ThreadAbstraction.cs +++ b/src/Renci.SshNet/Abstractions/ThreadAbstraction.cs @@ -36,6 +36,8 @@ namespace Renci.SshNet.Abstractions /// The action to execute. public static void ExecuteThread(Action action) { + if (action == null) + throw new ArgumentNullException("action"); #if FEATURE_THREAD_THREADPOOL System.Threading.ThreadPool.QueueUserWorkItem(o => action()); #elif FEATURE_THREAD_TAP