mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-03 10:04:32 +03:00
Ticket #2966: mcview: fix segfault after switch from parse to raw mode and back.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
4011bfe301
commit
7413c9c2ab
@ -210,7 +210,15 @@ mcview_growbuf_read_until (mcview_t * view, off_t ofs)
|
||||
g_free (err_msg);
|
||||
}
|
||||
|
||||
mcview_growbuf_done (view);
|
||||
if (view->ds_stdio_pipe != NULL)
|
||||
{
|
||||
/* when switch from parse to raw mode and back,
|
||||
* do not close the already closed pipe after following loop:
|
||||
* mcview_growbuf_read_until() -> mcview_show_error() ->
|
||||
* MSG_DRAW -> mcview_display() -> mcview_get_byte() -> mcview_growbuf_read_until()
|
||||
*/
|
||||
mcview_growbuf_done (view);
|
||||
}
|
||||
mcview_display (view);
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user