Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions platform/linuxbsd/wayland/wayland_thread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5375,9 +5375,19 @@ void WaylandThread::destroy() {
zwp_tablet_tool_v2_destroy(tool);
}

zwp_text_input_v3_destroy(ss->wp_text_input);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably should have null check, even if it's expected to be always initialized:

Suggested change
zwp_text_input_v3_destroy(ss->wp_text_input);
if (ss->wp_text_input) {
zwp_text_input_v3_destroy(ss->wp_text_input);
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops I merged without seeing this comment.
Probably worth adding in a future PR updating wayland_thread.cpp.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Absolutely, as I think that this might actually be a null dereference on platforms without it wp_text_input_support.


memdelete(ss);
}

if (registry.wp_tablet_manager) {
zwp_tablet_manager_v2_destroy(registry.wp_tablet_manager);
}

if (registry.wp_text_input_manager) {
zwp_text_input_manager_v3_destroy(registry.wp_text_input_manager);
}

for (struct wl_output *wl_output : registry.wl_outputs) {
ERR_FAIL_NULL(wl_output);

Expand Down