aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util')
-rw-r--r--tools/perf/util/newt.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/perf/util/newt.c b/tools/perf/util/newt.c
index 2f5f7a1878cf..aed21490ccdc 100644
--- a/tools/perf/util/newt.c
+++ b/tools/perf/util/newt.c
@@ -342,8 +342,10 @@ static void ui_browser__reset_index(struct ui_browser *self)
static int ui_browser__show(struct ui_browser *self, const char *title)
{
- if (self->form != NULL)
- return 0;
+ if (self->form != NULL) {
+ newtFormDestroy(self->form);
+ newtPopWindow();
+ }
ui_browser__refresh_dimensions(self);
newtCenteredWindow(self->width + 2, self->height, title);
self->form = newt_form__new();