Bug 1053: Fix crash when download ends.
commit4c2ddac28959eaf68a05a63a4e9852a1d4152d9e
authorKalle Olavi Niemitalo <kon@iki.fi>
Tue, 30 Sep 2008 07:06:20 +0000 (30 10:06 +0300)
committerKalle Olavi Niemitalo <Kalle@Astalo.kon.iki.fi>
Thu, 2 Oct 2008 21:18:41 +0000 (3 00:18 +0300)
tree912e3a9e12dd1481e8ae9ad2885e63bd6bf2b3c2
parent6ee45c710a32615742664e5edab436b016df75d2
Bug 1053: Fix crash when download ends.

ELinks attempted to display a message box on file_download.term, but
it had already closed that terminal and freed the struct terminal.  To
fix this, reset file_download.term pointers to NULL when the terminal
is about to be destroyed.  Also, assert in download_data_store() that
file_download.term is either NULL or in the global "terminals" list.

Reported by أحمد المحمودي.
(cherry picked from commit 6e2476ea4d72d91de83c481b1e019d93d6317b35)
NEWS
src/session/download.c
src/session/download.h
src/terminal/terminal.c
src/terminal/terminal.h