mirror of
https://github.com/swaywm/sway.git
synced 2026-04-18 06:46:56 -04:00
chore: handle memory leaking
This commit is contained in:
parent
5725d3a170
commit
77343fde2b
1 changed files with 6 additions and 6 deletions
|
|
@ -312,15 +312,15 @@ static void input_popup_update(struct sway_input_popup *popup) {
|
|||
}
|
||||
|
||||
if (!popup->popup_surface->surface->mapped) {
|
||||
popup->scene_tree = NULL;
|
||||
popup->desc.view = NULL;
|
||||
return;
|
||||
}
|
||||
|
||||
if (popup->scene_tree != NULL) {
|
||||
wlr_scene_node_destroy(&popup->scene_tree->node);
|
||||
if (popup->desc.relative != NULL) {
|
||||
wlr_scene_node_destroy(popup->desc.relative);
|
||||
}
|
||||
}
|
||||
wlr_scene_node_destroy(&popup->scene_tree->node);
|
||||
wlr_scene_node_destroy(popup->desc.relative);
|
||||
popup->scene_tree = NULL;
|
||||
popup->desc.view = NULL;
|
||||
|
||||
bool cursor_rect = text_input->input->current.features
|
||||
& WLR_TEXT_INPUT_V3_FEATURE_CURSOR_RECTANGLE;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue