summaryrefslogtreecommitdiff
path: root/src/gui/gui-layout.c
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2023-01-27 20:47:24 +0100
committerSébastien Helleu <flashcode@flashtux.org>2023-01-28 15:14:22 +0100
commitc07cf691adb4740759e9fd128a2f6702c912d70f (patch)
tree91520d9be1270aae41d23ffeae1f69d3a31b10d2 /src/gui/gui-layout.c
parentc9ac4fef4b7aa054df72bddf667edea0608d39c6 (diff)
downloadweechat-c07cf691adb4740759e9fd128a2f6702c912d70f.zip
core, plugins: check that string parameters are not NULL in search functions (issue #1872)
Diffstat (limited to 'src/gui/gui-layout.c')
-rw-r--r--src/gui/gui-layout.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/gui-layout.c b/src/gui/gui-layout.c
index 51b12c1d8..f7f9155d6 100644
--- a/src/gui/gui-layout.c
+++ b/src/gui/gui-layout.c
@@ -55,6 +55,9 @@ gui_layout_search (const char *name)
{
struct t_gui_layout *ptr_layout;
+ if (!name)
+ return NULL;
+
for (ptr_layout = gui_layouts; ptr_layout;
ptr_layout = ptr_layout->next_layout)
{