diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2026-01-20 09:51:39 +0100 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2026-01-20 09:51:39 +0100 |
| commit | 138624fa27bccb15136140a49924f826b77314e8 (patch) | |
| tree | ffac78154a09337d5ac0907c92febbf71294bb7b /src | |
| parent | 61e75e4a12f199368f28dd274d83fc4ecd9cfec3 (diff) | |
Remove possible NULL dereference introduced at commit 61e75e4
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; } |
