summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2005-04-03 17:12:12 +0000
committerSebastien Helleu <flashcode@flashtux.org>2005-04-03 17:12:12 +0000
commit20dcc4f56ee1aef779a89a2c2ea199fdac458092 (patch)
treed526d853aa85c5ecfe936eb11180135096e6243c /src/gui
parent36b2e104972c16bba720d356b398c0845bcfc4b6 (diff)
downloadweechat-20dcc4f56ee1aef779a89a2c2ea199fdac458092.zip
Fixed crash when purging old DCC
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/curses/gui-input.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gui/curses/gui-input.c b/src/gui/curses/gui-input.c
index ec8c8ba43..7d92ae8e7 100644
--- a/src/gui/curses/gui-input.c
+++ b/src/gui/curses/gui-input.c
@@ -53,7 +53,7 @@ gui_read_keyb ()
int key, i;
t_gui_buffer *ptr_buffer;
t_irc_server *ptr_server;
- t_irc_dcc *ptr_dcc;
+ t_irc_dcc *ptr_dcc, *ptr_dcc_next;
char new_char[3], *decoded_string;
t_irc_dcc *dcc_selected;
@@ -591,10 +591,13 @@ gui_read_keyb ()
case 'p':
case 'P':
gui_current_window->dcc_selected = NULL;
- for (ptr_dcc = dcc_list; ptr_dcc; ptr_dcc = ptr_dcc->next_dcc)
+ ptr_dcc = dcc_list;
+ while (ptr_dcc)
{
+ ptr_dcc_next = ptr_dcc->next_dcc;
if (DCC_ENDED(ptr_dcc->status))
dcc_free (ptr_dcc);
+ ptr_dcc = ptr_dcc_next;
}
gui_redraw_buffer (gui_current_window->buffer);
break;