1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-04 10:02:40 +01:00

Check if process HasExited before getting ProcessInfo.

Fixes ND-8.
This commit is contained in:
Mark McDowall 2012-01-06 13:11:45 -08:00
parent a3f2ef6ec6
commit b1aeb0a973

View File

@ -91,7 +91,7 @@ public virtual void SetPriority(int processId, ProcessPriorityClass priority)
private static ProcessInfo ConvertToProcessInfo(Process process)
{
if (process == null || process.Id <= 0) return null;
if (process == null || process.Id <= 0 || process.HasExited) return null;
return new ProcessInfo
{