Skip to content

Commit 9ec021a

Browse files
committed
patch 7.4.970
Problem: Rare crash in getvcol(). (Timo Mihaljov) Solution: Check for the buffer being NULL in init_preedit_start_col. (Hirohito Higashi, Christian Brabandt)
1 parent 35be453 commit 9ec021a

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/mbyte.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4541,7 +4541,7 @@ init_preedit_start_col(void)
45414541
{
45424542
if (State & CMDLINE)
45434543
preedit_start_col = cmdline_getvcol_cursor();
4544-
else if (curwin != NULL)
4544+
else if (curwin != NULL && curwin->w_buffer != NULL)
45454545
getvcol(curwin, &curwin->w_cursor, &preedit_start_col, NULL, NULL);
45464546
/* Prevent that preediting marks the buffer as changed. */
45474547
xim_changed_while_preediting = curbuf->b_changed;

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -741,6 +741,8 @@ static char *(features[]) =
741741

742742
static int included_patches[] =
743743
{ /* Add new patch number below this line */
744+
/**/
745+
970,
744746
/**/
745747
969,
746748
/**/

0 commit comments

Comments
 (0)