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:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user