mirror of
https://github.com/weechat/weechat.git
synced 2026-07-06 09:43:13 +02:00
trigger: if hashmap creation failed, don't use tags
If hashmap creation fails (eg. not enough memory), it jumps to the label "end", where it checks the pointer tags, that hadn't been initialized before. The simple fix is to initialize it before creating the hashmap.
This commit is contained in:
@@ -593,13 +593,13 @@ trigger_callback_modifier_cb (const void *pointer, void *data,
|
||||
|
||||
TRIGGER_CALLBACK_CB_INIT(NULL);
|
||||
|
||||
TRIGGER_CALLBACK_CB_NEW_POINTERS;
|
||||
|
||||
buffer = NULL;
|
||||
tags = NULL;
|
||||
num_tags = 0;
|
||||
string_no_color = NULL;
|
||||
|
||||
TRIGGER_CALLBACK_CB_NEW_POINTERS;
|
||||
|
||||
/* split IRC message (if string is an IRC message) */
|
||||
if ((strncmp (modifier, "irc_in_", 7) == 0)
|
||||
|| (strncmp (modifier, "irc_in2_", 8) == 0)
|
||||
|
||||
Reference in New Issue
Block a user