1
0
Fork 0
mirror of https://github.com/lidarr/Lidarr synced 2024-12-21 23:32:27 +00:00

Fixed: Error getting processes in some cases

(cherry picked from commit b552d4e9f7ca7388404aa0d52566010a54cb0244)
This commit is contained in:
Mark McDowall 2024-12-10 19:25:13 -08:00 committed by Bogdan
parent 0fd6c263b1
commit 502cb20898

View file

@ -313,7 +313,7 @@ private ProcessInfo ConvertToProcessInfo(Process process)
processInfo = new ProcessInfo(); processInfo = new ProcessInfo();
processInfo.Id = process.Id; processInfo.Id = process.Id;
processInfo.Name = process.ProcessName; processInfo.Name = process.ProcessName;
processInfo.StartPath = process.MainModule.FileName; processInfo.StartPath = process.MainModule?.FileName;
if (process.Id != GetCurrentProcessId() && process.HasExited) if (process.Id != GetCurrentProcessId() && process.HasExited)
{ {