aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-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)
342 342
343static int ui_browser__show(struct ui_browser *self, const char *title) 343static int ui_browser__show(struct ui_browser *self, const char *title)
344{ 344{
345 if (self->form != NULL) 345 if (self->form != NULL) {
346 return 0; 346 newtFormDestroy(self->form);
347 newtPopWindow();
348 }
347 ui_browser__refresh_dimensions(self); 349 ui_browser__refresh_dimensions(self);
348 newtCenteredWindow(self->width + 2, self->height, title); 350 newtCenteredWindow(self->width + 2, self->height, title);
349 self->form = newt_form__new(); 351 self->form = newt_form__new();