perf ui hist browser: Fix segfault on 'a' for annotate
authorFrederik Deweerdt <frederik.deweerdt@xprog.eu>
Thu, 23 Sep 2010 20:19:01 +0000 (22:19 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 4 Oct 2010 15:08:37 +0000 (12:08 -0300)
There a typo in util/ui/browsers/hists.c that leads to a segfault when you
press the 'a' key on a non-resolved symbol (plain hex address).

LKML-Reference: <20100923201901.GE31726@gambetta>
Signed-off-by: Frederik Deweerdt <frederik.deweerdt@xprog.eu>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/ui/browsers/hists.c

index dafdf6775d77f44d69abf1980b1a9cfe4ab053dc..6866aa4c41e09cfd0239559cc903506a351a549c 100644 (file)
@@ -773,7 +773,7 @@ int hists__browse(struct hists *self, const char *helpline, const char *ev_name)
 
                        switch (key) {
                        case 'a':
-                               if (browser->selection->map == NULL &&
+                               if (browser->selection->map == NULL ||
                                    browser->selection->map->dso->annotate_warned)
                                        continue;
                                goto do_annotate;