From 191b01a70e2845fac3e3da1cb2af8c9cbb8c3977 Mon Sep 17 00:00:00 2001 From: ailin-nemui Date: Mon, 5 Feb 2018 22:24:17 +0100 Subject: [PATCH] Merge pull request #837 from ailin-nemui/no-show check the error condition of mainwindow_create (cherry picked from commit 442f6f08b4d99e86c3961be71638abec0f0f8070) --- src/fe-text/mainwindows.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/fe-text/mainwindows.c b/src/fe-text/mainwindows.c index 5f58c25f..f5e20517 100644 --- a/src/fe-text/mainwindows.c +++ b/src/fe-text/mainwindows.c @@ -810,6 +810,11 @@ static void cmd_window_show(const char *data) } parent = mainwindow_create(); + if (parent == NULL) { + printformat_window(active_win, MSGLEVEL_CLIENTERROR, TXT_WINDOW_TOO_SMALL); + return; + } + parent->active = window; gui_window_reparent(window, parent);