summaryrefslogtreecommitdiff
path: root/src/fe-text
diff options
context:
space:
mode:
authorLemonBoy <thatlemon@gmail.com>2017-02-14 13:38:59 +0100
committerLemonBoy <thatlemon@gmail.com>2017-02-14 14:46:14 +0100
commit98ead50b4eea7cda4b357f1c4b19a741205c6fa4 (patch)
tree48e88298be098ae9d987fefb898219b87f29535f /src/fe-text
parent228f487a69cc032b368a0ae0daea6796b7d10d6e (diff)
downloadirssi-98ead50b4eea7cda4b357f1c4b19a741205c6fa4.zip
Prevent some potential null-pointer deferences.
Spotted by our friend scan-build.
Diffstat (limited to 'src/fe-text')
-rw-r--r--src/fe-text/mainwindows-layout.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/fe-text/mainwindows-layout.c b/src/fe-text/mainwindows-layout.c
index 020969e6..fae02539 100644
--- a/src/fe-text/mainwindows-layout.c
+++ b/src/fe-text/mainwindows-layout.c
@@ -121,6 +121,8 @@ static void sig_layout_restore(void)
if (node == NULL) return;
sorted_config = get_sorted_windows_config(node);
+ if (sorted_config == NULL) return;
+
windows_count = g_slist_length(sorted_config);
/* calculate the saved terminal height */