console: fix bug in buffer-erase helper
We didn't check for NULL line so we got segfaults when erasing empty lines. Fix this. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit is contained in:
parent
d3951da865
commit
7c8eb3b108
@ -918,6 +918,11 @@ void kmscon_buffer_erase_region(struct kmscon_buffer *buf, unsigned int x_from,
|
||||
|
||||
for ( ; y_from <= y_to; ++y_from) {
|
||||
line = get_line(buf, y_from);
|
||||
if (!line) {
|
||||
x_from = 0;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (y_from == y_to)
|
||||
to = x_to;
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user