]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - tools/perf/ui/browsers/hists.c
perf hists browser: Only offer symbol scripting when a symbol is under the cursor
[karo-tx-linux.git] / tools / perf / ui / browsers / hists.c
index 81def6c3f24bf16397c8e15d26178cd4957bd86f..3900386a3629410b903223642b449159ecd18e13 100644 (file)
@@ -2059,10 +2059,12 @@ skip_annotation:
                         *
                         * See hist_browser__show_entry.
                         */
-                       nr_options += add_script_opt(browser,
-                                                    &actions[nr_options],
-                                                    &options[nr_options],
-                                                    NULL, browser->selection->sym);
+                       if (sort__has_sym && browser->selection->sym) {
+                               nr_options += add_script_opt(browser,
+                                                            &actions[nr_options],
+                                                            &options[nr_options],
+                                                            NULL, browser->selection->sym);
+                       }
                }
                nr_options += add_script_opt(browser, &actions[nr_options],
                                             &options[nr_options], NULL, NULL);