Commit 33f9cbaf authored by Carlos Garnacho's avatar Carlos Garnacho

gtkmodelbutton: Plug a leak

The private struct had some data that needed freeing, but this widget
didn't have any destroy/dispose/finalize handlers.
parent 6de82c9b
......@@ -794,6 +794,16 @@ gtk_model_button_draw (GtkWidget *widget,
return FALSE;
static void
gtk_model_button_destroy (GtkWidget *widget)
GtkModelButton *model_button = GTK_MODEL_BUTTON (widget);
g_clear_pointer (&model_button->menu_name, g_free);
GTK_WIDGET_CLASS (gtk_model_button_parent_class)->destroy (widget);
static void
gtk_model_button_clicked (GtkButton *button)
......@@ -833,6 +843,7 @@ gtk_model_button_class_init (GtkModelButtonClass *class)
widget_class->get_preferred_height_and_baseline_for_width = gtk_model_button_get_preferred_height_and_baseline_for_width;
widget_class->size_allocate = gtk_model_button_size_allocate;
widget_class->draw = gtk_model_button_draw;
widget_class->destroy = gtk_model_button_destroy;
button_class->clicked = gtk_model_button_clicked;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment