summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorMathieu Denis2012-06-29 15:21:16 (EDT)
committer Patrick Tasse2012-06-29 15:21:16 (EDT)
commit803c5f2dee202cb2a726fc642b30b0ca257c8d95 (patch)
treeee6666f01646a1159a37600fabe0075a5cf817e1
parentb2e4aa841eeb8b15b4d6e4f1aa4e657702432239 (diff)
downloadorg.eclipse.linuxtools-803c5f2dee202cb2a726fc642b30b0ca257c8d95.zip
org.eclipse.linuxtools-803c5f2dee202cb2a726fc642b30b0ca257c8d95.tar.gz
org.eclipse.linuxtools-803c5f2dee202cb2a726fc642b30b0ca257c8d95.tar.bz2
Fix for bug 382438: null pointer exception when closing statistics view
-rwxr-xr-xlttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/statistics/TmfStatisticsView.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/statistics/TmfStatisticsView.java b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/statistics/TmfStatisticsView.java
index 48e6ecb..e091402 100755
--- a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/statistics/TmfStatisticsView.java
+++ b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/statistics/TmfStatisticsView.java
@@ -245,6 +245,8 @@ public class TmfStatisticsView extends TmfView {
fWaitCursor.dispose();
}
+ // Make sure there is no request running before removing the statistics tree
+ cancelOngoingRequest();
// clean the model
TmfStatisticsTreeRootFactory.removeAll();
}
@@ -500,12 +502,12 @@ public class TmfStatisticsView extends TmfView {
// Preparation of the event request
fRequest = new TmfEventRequest<ITmfEvent>(ITmfEvent.class, timeRange, index, TmfDataRequest.ALL_DATA, getIndexPageSize(), ExecutionType.BACKGROUND) {
+ private final AbsTmfStatisticsTree statisticsData = TmfStatisticsTreeRootFactory.getStatTree(getTreeID(experiment.getName()));
+
@Override
public void handleData(ITmfEvent data) {
super.handleData(data);
if (data != null) {
- AbsTmfStatisticsTree statisticsData = TmfStatisticsTreeRootFactory.getStatTree(getTreeID(experiment.getName()));
-
final String traceName = data.getTrace().getName();
ITmfExtraEventInfo extraInfo = new ITmfExtraEventInfo() {
@Override