range: Don't leak pointers to discarded gadgets
This commit is contained in:
parent
96e7fbde2e
commit
dbc0337498
@ -3972,6 +3972,10 @@ sync_stepper_gadget (GtkRange *range,
|
||||
{
|
||||
if (*gadget_ptr != NULL)
|
||||
{
|
||||
if (*gadget_ptr == priv->grab_location)
|
||||
stop_scrolling (range);
|
||||
if (*gadget_ptr == priv->mouse_location)
|
||||
priv->mouse_location = NULL;
|
||||
gtk_css_node_set_parent (gtk_css_gadget_get_node (*gadget_ptr), NULL);
|
||||
gtk_box_gadget_remove_gadget (GTK_BOX_GADGET (priv->contents_gadget), *gadget_ptr);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user