summaryrefslogtreecommitdiff
path: root/src/fe-text
diff options
context:
space:
mode:
authorailin-nemui <ailin-nemui@users.noreply.github.com>2018-02-05 22:24:17 +0100
committerGitHub <noreply@github.com>2018-02-05 22:24:17 +0100
commit442f6f08b4d99e86c3961be71638abec0f0f8070 (patch)
tree8aa13b867ed080abce28282fb27639b44aa9cac6 /src/fe-text
parentc25e1221494e20cb96b4a541b9027dbfd8836711 (diff)
parent5b5bfef03596d95079c728f65f523570dd7b03aa (diff)
downloadirssi-442f6f08b4d99e86c3961be71638abec0f0f8070.zip
Merge pull request #837 from ailin-nemui/no-show
check the error condition of mainwindow_create
Diffstat (limited to 'src/fe-text')
-rw-r--r--src/fe-text/mainwindows.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/fe-text/mainwindows.c b/src/fe-text/mainwindows.c
index 5f24674f..0c77bcf1 100644
--- a/src/fe-text/mainwindows.c
+++ b/src/fe-text/mainwindows.c
@@ -1393,6 +1393,11 @@ static void _cmd_window_show_opt(const char *data, int right)
}
parent = mainwindow_create(right);
+ if (parent == NULL) {
+ printformat_window(active_win, MSGLEVEL_CLIENTERROR, TXT_WINDOW_TOO_SMALL);
+ return;
+ }
+
parent->active = window;
gui_window_reparent(window, parent);