Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernd Hufmann2014-06-04 19:11:27 +0000
committerBernd Hufmann2014-06-05 14:46:54 +0000
commit7f3855be62b389570f6da993768b3aabe149f86b (patch)
tree0523e83e9924e607ef199b6fe71278cad25582c4
parent67dd68b2fc1473c0b0caa6e365ae8fcf32cc3440 (diff)
downloadorg.eclipse.linuxtools-7f3855be62b389570f6da993768b3aabe149f86b.tar.gz
org.eclipse.linuxtools-7f3855be62b389570f6da993768b3aabe149f86b.tar.xz
org.eclipse.linuxtools-7f3855be62b389570f6da993768b3aabe149f86b.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> Reviewed-on: https://git.eclipse.org/r/28025 Reviewed-by: Patrick Tasse <patrick.tasse@gmail.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