1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-24 11:56:38 +02:00

core: return 0 in gui_buffer_is_main if plugin_name or name is NULL

This commit is contained in:
Sébastien Helleu
2024-01-24 19:42:08 +01:00
parent 971d5b6b64
commit da79574ca7
+2 -2
View File
@@ -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 */