execute: don't crash when an empty buffer is piped through a command
That is, take into account that the cutbuffer could be NULL (when updating the undo item). This fixes https://savannah.gnu.org/bugs/?62107. Bug existed since version 4.9, commit b15c5a7e.
This commit is contained in:
parent
0d85a798e5
commit
93400ec8a1
@ -1177,7 +1177,8 @@ void update_undo(undo_type action)
|
||||
else if (cutbuffer != NULL) {
|
||||
free_lines(u->cutbuffer);
|
||||
u->cutbuffer = copy_buffer(cutbuffer);
|
||||
}
|
||||
} else
|
||||
break;
|
||||
if (!(u->xflags & MARK_WAS_SET)) {
|
||||
linestruct *bottomline = u->cutbuffer;
|
||||
size_t count = 0;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user