1
1

undo: do not try to paste back an empty cutbuffer

Trying to do so would dereference a NULL pointer in copy_node().

This fixes https://savannah.gnu.org/bugs/?57915.

Bug existed since before version 2.2.0.
Этот коммит содержится в:
Benno Schulenberg 2020-02-28 12:52:06 +01:00
родитель 1a28b08694
Коммит 0568f7a2b6

Просмотреть файл

@ -762,7 +762,8 @@ void do_redo(void)
case INSERT:
redidmsg = _("insertion");
goto_line_posx(u->head_lineno, u->head_x);
copy_from_buffer(u->cutbuffer);
if (u->cutbuffer)
copy_from_buffer(u->cutbuffer);
free_lines(u->cutbuffer);
u->cutbuffer = NULL;
break;