[mono/monodevelop] 7e96e6eb: [Refactoring] Fixed potential crash in results editor extension.

Mike Krüger ([email protected]) <[email protected]>
Newsgroups gmane.comp.gnome.mono.patches
Message-ID <000001418413ec8a-4800ecce-9815-459d-9045-d58ac2b83027-000000@email.amazonses.com>
   Branch: refs/heads/master
     Home: https://github.com/mono/monodevelop
  Compare: https://github.com/mono/monodevelop/compare/8964d792069a...7e96e6ebb06e

   Commit: 7e96e6ebb06ef097f4f3b6fbfd6ef95cfc97f7fa
   Author: Mike Krüger <[email protected]> (mkrueger)
     Date: 2013-10-04 15:25:20 GMT
      URL: https://github.com/mono/monodevelop/commit/7e96e6ebb06ef097f4f3b6fbfd6ef95cfc97f7fa

[Refactoring] Fixed potential crash in results editor extension.

Changed paths:
  M main/src/addins/MonoDevelop.Refactoring/MonoDevelop.AnalysisCore/Gui/ResultsEditorExtension.cs

Modified: main/src/addins/MonoDevelop.Refactoring/MonoDevelop.AnalysisCore/Gui/ResultsEditorExtension.cs
===================================================================
@@ -193,7 +193,8 @@ bool IdleHandler ()
 					if (currentResult.InspectionMark != IssueMarker.None) {
 						int start = editor.LocationToOffset (currentResult.Region.Begin);
 						int end = editor.LocationToOffset (currentResult.Region.End);
-
+						if (start >= end)
+							continue;
 						if (currentResult.InspectionMark == IssueMarker.GrayOut) {
 							var marker = new GrayOutMarker (currentResult, TextSegment.FromBounds (start, end));
 							marker.IsVisible = currentResult.Underline;
_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.