Merge branch '2966_view_broken_manpage_fix'

* 2966_view_broken_manpage_fix:
  Ticket #2966: mcview: fix segfault after switch from parse to raw mode and back.
This commit is contained in:
Andrew Borodin 2015-01-14 09:37:28 +03:00
commit 774762a8e9

View File

@ -210,7 +210,15 @@ mcview_growbuf_read_until (mcview_t * view, off_t ofs)
g_free (err_msg);
}
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;
}