mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-16 17:57:43 +00:00
fix potential index out of bounds exception
This commit is contained in:
parent
53b8980fb0
commit
c18b28f850
@ -25,7 +25,6 @@ import java.util.logging.Level;
|
|||||||
import javafx.application.Platform;
|
import javafx.application.Platform;
|
||||||
import javafx.beans.InvalidationListener;
|
import javafx.beans.InvalidationListener;
|
||||||
import javafx.beans.Observable;
|
import javafx.beans.Observable;
|
||||||
import javafx.collections.ObservableList;
|
|
||||||
import javafx.scene.Scene;
|
import javafx.scene.Scene;
|
||||||
import javafx.scene.control.SplitPane;
|
import javafx.scene.control.SplitPane;
|
||||||
import javafx.scene.control.Tab;
|
import javafx.scene.control.Tab;
|
||||||
@ -98,7 +97,7 @@ public final class TimeLineTopComponent extends TopComponent implements Explorer
|
|||||||
private final InvalidationListener selectedEventsListener = new InvalidationListener() {
|
private final InvalidationListener selectedEventsListener = new InvalidationListener() {
|
||||||
@Override
|
@Override
|
||||||
public void invalidated(Observable observable) {
|
public void invalidated(Observable observable) {
|
||||||
ObservableList<Long> selectedEventIDs = controller.getSelectedEventIDs();
|
List<Long> selectedEventIDs = controller.getSelectedEventIDs();
|
||||||
|
|
||||||
//depending on the active view mode, we either update the dataResultPanel, or update the contentViewerPanel directly.
|
//depending on the active view mode, we either update the dataResultPanel, or update the contentViewerPanel directly.
|
||||||
switch (controller.getViewMode()) {
|
switch (controller.getViewMode()) {
|
||||||
@ -124,7 +123,7 @@ public final class TimeLineTopComponent extends TopComponent implements Explorer
|
|||||||
LOGGER.log(Level.SEVERE, "Selecting the event node was vetoed.", ex); // NON-NLS
|
LOGGER.log(Level.SEVERE, "Selecting the event node was vetoed.", ex); // NON-NLS
|
||||||
}
|
}
|
||||||
//if there is only one event selected push it into content viewer.
|
//if there is only one event selected push it into content viewer.
|
||||||
if (selectedEventIDs.size() == 1) {
|
if (childArray.length == 1) {
|
||||||
contentViewerPanel.setNode(childArray[0]);
|
contentViewerPanel.setNode(childArray[0]);
|
||||||
} else {
|
} else {
|
||||||
contentViewerPanel.setNode(null);
|
contentViewerPanel.setNode(null);
|
||||||
@ -137,7 +136,7 @@ public final class TimeLineTopComponent extends TopComponent implements Explorer
|
|||||||
LOGGER.log(Level.SEVERE, "Failed to lookup Sleuthkit object backing a SingleEvent.", ex); // NON-NLS
|
LOGGER.log(Level.SEVERE, "Failed to lookup Sleuthkit object backing a SingleEvent.", ex); // NON-NLS
|
||||||
Platform.runLater(() -> {
|
Platform.runLater(() -> {
|
||||||
Notifications.create()
|
Notifications.create()
|
||||||
.owner(jFXViewPanel.getScene().getWindow())
|
.owner(jFXViewPanel.getScene().getWindow())
|
||||||
.text(Bundle.TimelineTopComponent_selectedEventListener_errorMsg())
|
.text(Bundle.TimelineTopComponent_selectedEventListener_errorMsg())
|
||||||
.showError();
|
.showError();
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user