Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernd Hufmann2014-06-04 15:11:27 -0400
committerBernd Hufmann2014-06-04 18:08:25 -0400
commit58e88f1fb1f5416b7a989a9e1094e557c9d33f6e (patch)
treeaf183cae32b1d15e7caefb8e8c07ce3785df3081
parentc87a5fcadec0abba379756ee071d6c41376f7c18 (diff)
downloadorg.eclipse.linuxtools-58e88f1fb1f5416b7a989a9e1094e557c9d33f6e.tar.gz
org.eclipse.linuxtools-58e88f1fb1f5416b7a989a9e1094e557c9d33f6e.tar.xz
org.eclipse.linuxtools-58e88f1fb1f5416b7a989a9e1094e557c9d33f6e.zip
tmf-ctf: fix NPE in callsite handling (bug 436625)
Change-Id: Iaaecf310226eeb84cfa30c69035eb8f34cda3c91 Signed-off-by: Bernd Hufmann <Bernd.Hufmann@ericsson.com> Reviewed-on: https://git.eclipse.org/r/27991 Reviewed-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im> Tested-by: Hudson CI Reviewed-by: Bernd Hufmann <bernd.hufmann@ericsson.com> Tested-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
-rw-r--r--lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFTrace.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFTrace.java b/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFTrace.java
index 51af54d73d..dcd86d6987 100644
--- a/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFTrace.java
+++ b/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFTrace.java
@@ -915,6 +915,9 @@ public class CTFTrace implements IDefinitionScope, AutoCloseable {
*/
public CTFCallsite getCallsite(String eventName, long ip) {
final TreeSet<CTFCallsite> candidates = fCallsitesByName.get(eventName);
+ if (candidates == null) {
+ return null;
+ }
final CTFCallsite dummyCs = new CTFCallsite(null, null, ip, null, -1);
final CTFCallsite callsite = candidates.ceiling(dummyCs);
if (callsite == null) {

Back to the top