summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2024-01-24 19:42:08 +0100
committerSébastien Helleu <flashcode@flashtux.org>2024-01-24 19:42:08 +0100
commitda79574ca78a57afe8a3d4cd66df3ef8a56afbab (patch)
tree30cbc48284249c09c62825e186c26a8f2d0bdae2 /src
parent971d5b6b64f2e7ab388a4668ae3b0257f9790a3d (diff)
downloadweechat-da79574ca78a57afe8a3d4cd66df3ef8a56afbab.zip
core: return 0 in gui_buffer_is_main if plugin_name or name is NULL
Diffstat (limited to 'src')
-rw-r--r--src/gui/gui-buffer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/gui-buffer.c b/src/gui/gui-buffer.c
index ae17e4fdc..dfdb46f63 100644
--- a/src/gui/gui-buffer.c
+++ b/src/gui/gui-buffer.c
@@ -2750,11 +2750,11 @@ int
gui_buffer_is_main (const char *plugin_name, const char *name)
{
/* if plugin is set and is not "core", then it's NOT main buffer */
- if (plugin_name && (strcmp (plugin_name, plugin_get_name (NULL)) != 0))
+ if (!plugin_name || (strcmp (plugin_name, plugin_get_name (NULL)) != 0))
return 0;
/* if name is set and is not "weechat", then it's NOT main buffer */
- if (name && (strcmp (name, GUI_BUFFER_MAIN) != 0))
+ if (!name || (strcmp (name, GUI_BUFFER_MAIN) != 0))
return 0;
/* it's main buffer */