Skip to content

Wayland: Add missing destroy calls for text input and tablet#113947

Merged
akien-mga merged 1 commit intogodotengine:masterfrom
deralmas:wl-misc-fixes/cleanup-forgor
Dec 16, 2025
Merged

Wayland: Add missing destroy calls for text input and tablet#113947
akien-mga merged 1 commit intogodotengine:masterfrom
deralmas:wl-misc-fixes/cleanup-forgor

Conversation

@deralmas
Copy link
Contributor

Thank you Kiisu_Master for finding this!


This is very easy to mess up. In the end, I think I'm actually going to figure out how to unify the logic, despite avoiding doing that for so long.

Cherry-pickable to 4.5.

Thank you Kiisu_Master for finding this!
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.

@akien-mga akien-mga merged commit 3e2f769 into godotengine:master Dec 16, 2025
20 checks passed
@akien-mga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants