summaryrefslogtreecommitdiff
path: root/src/fe-text
diff options
context:
space:
mode:
authorailin-nemui <ailin-nemui@users.noreply.github.com>2018-02-02 10:05:37 +0100
committerailin-nemui <ailin-nemui@users.noreply.github.com>2018-02-02 10:05:37 +0100
commit5b5bfef03596d95079c728f65f523570dd7b03aa (patch)
tree2f680d5ed978d83f9c9627288dd3b7e9536a9cd2 /src/fe-text
parent6d42c4f949ab7d3d403d2f31d6a816961a180e2b (diff)
downloadirssi-5b5bfef03596d95079c728f65f523570dd7b03aa.zip
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);