From 312f7ccc103f0104d2c7ba66f770a5985c30d1dc Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Tue, 30 Oct 2018 17:40:22 +0200 Subject: [PATCH] X11: Fix msghistory restore segfault --- win/X11/winX.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/win/X11/winX.c b/win/X11/winX.c index 389fa1bab..7337e6f04 100644 --- a/win/X11/winX.c +++ b/win/X11/winX.c @@ -202,6 +202,9 @@ boolean init; static int numlines = 0; struct xwindow *wp = &window_list[WIN_MESSAGE]; + if (init) + curr = (struct line_element *) 0; + if (!curr) { curr = wp->mesg_information->head; numlines = 0;