mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-09 05:58:22 +02:00
editor: Fix segfault when deleting the first character
This commit is contained in:
parent
3bdaa3e249
commit
b08b3296b8
1 changed files with 2 additions and 2 deletions
|
|
@ -380,11 +380,11 @@ text_input_keysym(void *data,
|
|||
text_entry_commit_and_reset(entry);
|
||||
|
||||
start = utf8_prev_char(entry->text, entry->text + entry->cursor);
|
||||
end = utf8_next_char(start);
|
||||
|
||||
if (start == NULL)
|
||||
return;
|
||||
|
||||
end = utf8_next_char(start);
|
||||
|
||||
text_entry_delete_text(entry,
|
||||
start - entry->text,
|
||||
end - start);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue