From becbe5e4ab6cc2bfbda273b197dc889d1a85821a Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Thu, 6 Sep 2012 20:36:37 +0200 Subject: [PATCH] Fix ArgumentOutOfRangeException when double-clicking the top-most pixel in the exception dialog's text box. --- .../Debugger/Debugger.AddIn/Service/DebuggeeExceptionForm.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/AddIns/Debugger/Debugger.AddIn/Service/DebuggeeExceptionForm.cs b/src/AddIns/Debugger/Debugger.AddIn/Service/DebuggeeExceptionForm.cs index 7411b20d30..eb8fa5eed5 100644 --- a/src/AddIns/Debugger/Debugger.AddIn/Service/DebuggeeExceptionForm.cs +++ b/src/AddIns/Debugger/Debugger.AddIn/Service/DebuggeeExceptionForm.cs @@ -81,6 +81,8 @@ namespace ICSharpCode.SharpDevelop.Services //string textLine = TextUtilities.GetLineAsString(textEditorControl.Document, line); Point clickPos = exceptionView.PointToClient(Control.MousePosition); int index = exceptionView.GetCharIndexFromPosition(clickPos); + if (index < 0) + return; int start = index; // find start of current line while (--start > 0 && fullText[start - 1] != '\n');