[gtk+] viewport: Don't destroy pixelcache while it's still used
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] viewport: Don't destroy pixelcache while it's still used
- Date: Wed, 20 Jan 2016 04:10:32 +0000 (UTC)
commit e3f8316d08e211d20fb0771576d4209e763b64ab
Author: Benjamin Otte <otte redhat com>
Date: Wed Jan 20 05:09:25 2016 +0100
viewport: Don't destroy pixelcache while it's still used
Removing the child unsets the pxielcache's style context...
gtk/gtkviewport.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtkviewport.c b/gtk/gtkviewport.c
index 3edf5ec..368374c 100644
--- a/gtk/gtkviewport.c
+++ b/gtk/gtkviewport.c
@@ -574,13 +574,11 @@ gtk_viewport_destroy (GtkWidget *widget)
viewport_disconnect_adjustment (viewport, GTK_ORIENTATION_HORIZONTAL);
viewport_disconnect_adjustment (viewport, GTK_ORIENTATION_VERTICAL);
- if (priv->pixel_cache)
- _gtk_pixel_cache_free (priv->pixel_cache);
- priv->pixel_cache = NULL;
-
g_clear_object (&priv->gadget);
GTK_WIDGET_CLASS (gtk_viewport_parent_class)->destroy (widget);
+
+ g_clear_pointer (&priv->pixel_cache, _gtk_pixel_cache_free);
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]