1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-02 07:46:38 +02:00

Fix crash with hook_process (when timer is called on a deleted hook process)

This commit is contained in:
Sebastien Helleu
2010-05-01 11:15:16 +02:00
parent 0e86f684a5
commit 8875c167d7
2 changed files with 9 additions and 1 deletions
+3 -1
View File
@@ -1,7 +1,7 @@
WeeChat ChangeLog
=================
FlashCode <flashcode@flashtux.org>
v0.3.3-dev, 2010-04-28
v0.3.3-dev, 2010-05-01
Version 0.3.3 (under dev!)
@@ -9,6 +9,8 @@ Version 0.3.3 (under dev!)
* core: add keys for undo/redo changes on command line
(default: ctrl/alt + underscore) (task #9483)
* core: fix crash with hook_process (when timer is called on a deleted hook
process)
* irc: add new options irc.network.autoreconnect_delay_growing and
irc.network.autoreconnect_delay_max (task #10338)
* irc: add new option irc.color.item_buffer_name_ssl (task #10339)
+6
View File
@@ -1290,6 +1290,9 @@ hook_process_child_read (struct t_hook *hook_process, int fd,
char buffer[4096];
int num_read;
if (hook_process->deleted)
return;
num_read = read (fd, buffer, sizeof (buffer) - 1);
if (num_read > 0)
{
@@ -1355,6 +1358,9 @@ hook_process_timer_cb (void *arg_hook_process, int remaining_calls)
hook_process = (struct t_hook *)arg_hook_process;
if (hook_process->deleted)
return WEECHAT_RC_OK;
if (remaining_calls == 0)
{
gui_chat_printf (NULL,