From b53cee163d1ee9f9875548416018dd086d9a004b Mon Sep 17 00:00:00 2001 From: Enrico Joerns Date: Tue, 15 Apr 2014 00:18:34 +0200 Subject: [PATCH] [cooja] plugins/LogListener: Prevent from throwing ArrayIndexOutOfBoundsException in case of empty logTable --- tools/cooja/java/org/contikios/cooja/plugins/LogListener.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/cooja/java/org/contikios/cooja/plugins/LogListener.java b/tools/cooja/java/org/contikios/cooja/plugins/LogListener.java index df2bf3cfc..b806906c3 100644 --- a/tools/cooja/java/org/contikios/cooja/plugins/LogListener.java +++ b/tools/cooja/java/org/contikios/cooja/plugins/LogListener.java @@ -383,6 +383,9 @@ public class LogListener extends VisPlugin implements HasQuickHelp { } int rowIndex = logTable.rowAtPoint(e.getPoint()); + if (rowIndex == -1) { + return; + } LogData d = logs.get(logTable.getRowSorter().convertRowIndexToModel(rowIndex)); if (d == null) { return;