tmf: Fix ArrayIndexOutOfBoundsException in time graph control
authorPatrick Tasse <patrick.tasse@gmail.com>
Tue, 13 Aug 2013 15:37:27 +0000 (11:37 -0400)
committerPatrick Tasse <patrick.tasse@gmail.com>
Tue, 13 Aug 2013 21:02:01 +0000 (17:02 -0400)
Change-Id: I4da4146e47f969c788cfe0096c3ca4ece891fa6e
Signed-off-by: Patrick Tasse <patrick.tasse@gmail.com>
Reviewed-on: https://git.eclipse.org/r/15436
Tested-by: Hudson CI
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/widgets/timegraph/widgets/TimeGraphControl.java

index 7f631aa4efef2630c19a0468aadc477a95949980..dec524744fe20647a9b4b68464fbe9e3602f6aad 100644 (file)
@@ -2500,6 +2500,7 @@ public class TimeGraphControl extends TimeGraphBaseControl implements FocusListe
                 refreshExpanded(expandedItemList, item);
             }
             fExpandedItems = expandedItemList.toArray(new Item[0]);
+            fTopIndex = Math.min(fTopIndex, Math.max(0, fExpandedItems.length - 1));
         }
 
         private void refreshExpanded(List<Item> expandedItemList, Item item) {
This page took 0.028636 seconds and 5 git commands to generate.