mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-15 05:00:09 +00:00
gtk-demo: Fix a few crash
The paintable demos were forgetting to clear their window variable.
This commit is contained in:
parent
e55bdf87b5
commit
2679e29375
@ -161,6 +161,7 @@ do_paintable (GtkWidget *do_widget)
|
||||
gtk_widget_get_display (do_widget));
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Nuclear Icon");
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 300, 200);
|
||||
g_object_add_weak_pointer (G_OBJECT (window), (gpointer *)&window);
|
||||
|
||||
nuclear = gtk_nuclear_icon_new (0.0);
|
||||
image = gtk_image_new_from_paintable (nuclear);
|
||||
|
@ -193,6 +193,7 @@ do_paintable_animated (GtkWidget *do_widget)
|
||||
gtk_widget_get_display (do_widget));
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Nuclear Animation");
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 300, 200);
|
||||
g_object_add_weak_pointer (G_OBJECT (window), (gpointer *)&window);
|
||||
|
||||
nuclear = gtk_nuclear_animation_new ();
|
||||
image = gtk_image_new_from_paintable (nuclear);
|
||||
|
Loading…
Reference in New Issue
Block a user