diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c index f14c83e6829a..a9cb1aede476 100644 --- a/tools/perf/util/evsel.c +++ b/tools/perf/util/evsel.c @@ -2930,6 +2930,8 @@ bool evsel__is_hybrid(struct evsel *evsel) struct evsel *evsel__leader(struct evsel *evsel) { + if (evsel->core.leader == NULL) + return NULL; return container_of(evsel->core.leader, struct evsel, core); }