diff --git a/gtk/gtktoolbutton.c b/gtk/gtktoolbutton.c index e7571b88c2..6232043f10 100644 --- a/gtk/gtktoolbutton.c +++ b/gtk/gtktoolbutton.c @@ -279,6 +279,10 @@ gtk_tool_button_init (GtkToolButton *button, { GtkToolItem *toolitem = GTK_TOOL_ITEM (button); + /* We still need to use G_TYPE_INSTANCE_GET_PRIVATE() because GtkToolButton + need to access the class pointer inside instance_init + See a detailed explanation of this at + https://gitlab.gnome.org/GNOME/gtk/merge_requests/402#note_361210 */ button->priv = G_TYPE_INSTANCE_GET_PRIVATE (button, GTK_TYPE_TOOL_BUTTON, GtkToolButtonPrivate);