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:
parent
bf81c633e9
commit
c528032b92
@ -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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user