summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2022-08-15 10:05:30 +0200
committerSébastien Helleu <flashcode@flashtux.org>2022-08-15 12:42:26 +0200
commit1ce2d7f56d2f3a547f5ad59b9e426675a1632059 (patch)
tree3219e4e879e6b0c8ed86cce8885f2f5f727d7a5e /src/plugins
parent223eefef67675e78d7eae550e7bcc26c4fa5332f (diff)
downloadweechat-1ce2d7f56d2f3a547f5ad59b9e426675a1632059.zip
trigger: fix error on monitor buffer creation when trigger debug is >= 1 and monitor buffer is closed
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/trigger/trigger-buffer.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/plugins/trigger/trigger-buffer.c b/src/plugins/trigger/trigger-buffer.c
index 7f5a91e65..efa2f1269 100644
--- a/src/plugins/trigger/trigger-buffer.c
+++ b/src/plugins/trigger/trigger-buffer.c
@@ -200,10 +200,13 @@ trigger_buffer_open (const char *filter, int switch_to_buffer)
{
if (!trigger_buffer)
{
- trigger_buffer = weechat_buffer_new (
- TRIGGER_BUFFER_NAME,
- &trigger_buffer_input_cb, NULL, NULL,
- &trigger_buffer_close_cb, NULL, NULL);
+ if (!weechat_buffer_search (TRIGGER_PLUGIN_NAME, TRIGGER_BUFFER_NAME))
+ {
+ trigger_buffer = weechat_buffer_new (
+ TRIGGER_BUFFER_NAME,
+ &trigger_buffer_input_cb, NULL, NULL,
+ &trigger_buffer_close_cb, NULL, NULL);
+ }
/* failed to create buffer ? then return */
if (!trigger_buffer)