From c528032b926ad72df8f4d998b419025599602f04 Mon Sep 17 00:00:00 2001 From: John Date: Mon, 6 Feb 2012 14:27:23 +0000 Subject: [PATCH] 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. --- PROMS/VEPROMS.CSLA.Library/Extension/DocumentExt.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/DocumentExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/DocumentExt.cs index d1a9d5d8..e45b68cd 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/DocumentExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/DocumentExt.cs @@ -493,7 +493,7 @@ namespace VEPROMS.CSLA.Library { try { - if (myProcess.PriorityClass != ProcessPriorityClass.High && myProcess.MainWindowTitle == "") + if (!myProcess.HasExited && myProcess.PriorityClass != ProcessPriorityClass.High && myProcess.MainWindowTitle == "") myProcess.PriorityClass = ProcessPriorityClass.High; } catch (Exception ex)