[gtk/wip/chergert/glproto: 266/493] fix warning and more assertions
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/chergert/glproto: 266/493] fix warning and more assertions
- Date: Fri, 19 Feb 2021 02:25:13 +0000 (UTC)
commit 7fc524387226cc13ce3b25ce953613484d5d4695
Author: Christian Hergert <chergert redhat com>
Date: Wed Jan 27 14:12:18 2021 -0800
fix warning and more assertions
gsk/next/gskgldriver.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/gsk/next/gskgldriver.c b/gsk/next/gskgldriver.c
index dbb2167da0..2a43989792 100644
--- a/gsk/next/gskgldriver.c
+++ b/gsk/next/gskgldriver.c
@@ -249,6 +249,10 @@ gsk_next_driver_dispose (GObject *object)
self->autorelease_framebuffers->len = 0;
}
+ g_assert (!self->textures || g_hash_table_size (self->textures) == 0);
+ g_assert (!self->texture_id_to_key || g_hash_table_size (self->texture_id_to_key) == 0);
+ g_assert (!self->key_to_texture_id|| g_hash_table_size (self->key_to_texture_id) == 0);
+
g_clear_object (&self->glyphs);
g_clear_object (&self->icons);
g_clear_object (&self->shadows);
@@ -280,7 +284,8 @@ static void
gsk_next_driver_init (GskNextDriver *self)
{
self->autorelease_framebuffers = g_array_new (FALSE, FALSE, sizeof (guint));
- self->textures = g_hash_table_new_full (NULL, NULL, NULL, gsk_gl_texture_free);
+ self->textures = g_hash_table_new_full (NULL, NULL, NULL,
+ (GDestroyNotify)gsk_gl_texture_free);
self->texture_id_to_key = g_hash_table_new (NULL, NULL);
self->key_to_texture_id = g_hash_table_new_full (texture_key_hash,
texture_key_equal,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]