diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx index 3816dff2c..c9774f895 100644 --- a/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx +++ b/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx @@ -1017,8 +1017,10 @@ void text_input_commit_string(void *data, struct zwp_text_input_v3 *zwp_text_inp const char *text) { //printf("text_input_commit_string %s\n",text); free(pending_commit); - pending_commit = text ? strdup(text) : NULL; - fl_utf8_remove_context_dependent(pending_commit, strlen(pending_commit)); + if (text) { + pending_commit = strdup(text); + fl_utf8_remove_context_dependent(pending_commit, strlen(pending_commit)); + } else pending_commit = NULL; } |
