From 09d5069dab572f2c95247d6b2de2c785ccae1dc7 Mon Sep 17 00:00:00 2001 From: nobushi95 Date: Sun, 9 Oct 2022 13:51:48 +0900 Subject: [PATCH] fix VS crash empty line tab indent in XAML --- CommandManager/CommandRouter.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/CommandManager/CommandRouter.cs b/CommandManager/CommandRouter.cs index 3a2a443..d7f330d 100644 --- a/CommandManager/CommandRouter.cs +++ b/CommandManager/CommandRouter.cs @@ -94,7 +94,14 @@ public int Exec(ref Guid pguidCmdGroup, uint nCmdID, uint nCmdexecopt, IntPtr pv } } - return this.Next.Exec(ref pguidCmdGroup, nCmdID, nCmdexecopt, pvaIn, pvaOut); + try + { + return this.Next.Exec(ref pguidCmdGroup, nCmdID, nCmdexecopt, pvaIn, pvaOut); + } + catch (ArgumentException) + { + return (int)OLE.Interop.Constants.OLECMDERR_E_CANCELED; + } } ///