summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/perf/util/symbol.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index d9e995bf8b6f..c0a028c3ebaf 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -50,6 +50,8 @@ struct symbol_conf symbol_conf = {
int dso__name_len(const struct dso *dso)
{
+ if (!dso)
+ return strlen("[unknown]");
if (verbose)
return dso->long_name_len;