Widow
/trunk/Widow/RuleEditForm.cs |
@@ -125,7 +125,16 @@ |
return; |
} |
|
var process = Helpers.GetProcessName(e.Handle); |
var process = string.Empty; |
try |
{ |
process = Helpers.GetProcessName(e.Handle); |
} |
catch |
{ |
return; |
} |
|
if (string.IsNullOrEmpty(process)) |
{ |
return; |
@@ -385,7 +394,16 @@ |
{ |
var hWnd = Natives.WindowFromPoint(new Point(e.X, e.Y)); |
Natives.GetWindowThreadProcessId(hWnd, out var pid); |
var process = Process.GetProcessById((int) pid); |
Process process; |
try |
{ |
process = Process.GetProcessById((int) pid); |
} |
catch |
{ |
return; |
} |
|
var windowTitle = Helpers.GetWindowTitle(process.MainWindowHandle); |
if (string.IsNullOrEmpty(windowTitle)) |
{ |