Permalink
Browse files

Reliably handle task list endpoint traversal. Case 445647.

  • Loading branch information...
1 parent bb958a1 commit 2597b3a75369003e92a7f2c4193142cb0f0ea1d0 @Tak Tak committed Mar 22, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Tasks/TaskStore.cs
@@ -397,6 +397,8 @@ NavigationPoint GetNextLocation (bool followSeverity)
n = IndexOfTask (currentLocationTask);
if (n != -1)
n++;
+ if (n >= tasks.Count)
+ n = 0;
}
// Jump over tasks with different severity or with no file name
@@ -455,6 +457,8 @@ NavigationPoint GetPreviousLocation (bool followSeverity)
n = IndexOfTask (currentLocationTask);
if (n != -1)
n--;
+ if (0 > n)
+ n = tasks.Count - 1;
}
while (n != -1 && n < tasks.Count && (iteratingSeverity != tasks [n].Severity || string.IsNullOrEmpty (tasks [n].FileName)))

0 comments on commit 2597b3a

Please sign in to comment.