In the check of winword processes, we need to also check to see if the process has existed before trying to stop it, else we will get a Null reference error when we when access the MyProcess.PriorityClass.

This commit is contained in:
John Jenko 2012-02-06 14:27:23 +00:00
parent bf81c633e9
commit c528032b92

View File

@ -493,7 +493,7 @@ namespace VEPROMS.CSLA.Library
{ {
try try
{ {
if (myProcess.PriorityClass != ProcessPriorityClass.High && myProcess.MainWindowTitle == "") if (!myProcess.HasExited && myProcess.PriorityClass != ProcessPriorityClass.High && myProcess.MainWindowTitle == "")
myProcess.PriorityClass = ProcessPriorityClass.High; myProcess.PriorityClass = ProcessPriorityClass.High;
} }
catch (Exception ex) catch (Exception ex)