[gnome-keyring] [gcr] Fix broken dispose of GcrCertificateWidget
- From: Stefan Walter <stefw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-keyring] [gcr] Fix broken dispose of GcrCertificateWidget
- Date: Mon, 11 Oct 2010 00:55:28 +0000 (UTC)
commit c0bf230aaa2ef8e0c72c0900eeba6a621ccc8dc0
Author: Stef Walter <stef memberwebs com>
Date: Mon Oct 11 00:37:24 2010 +0000
[gcr] Fix broken dispose of GcrCertificateWidget
Dispose and finalize of the gcr widgets was broken.
https://bugzilla.gnome.org/show_bug.cgi?id=631840
gcr/gcr-display-view.c | 10 +++++-----
gcr/tests/ui-test-certificate.c | 2 +-
2 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/gcr/gcr-display-view.c b/gcr/gcr-display-view.c
index 2871fc0..3f0807d 100644
--- a/gcr/gcr-display-view.c
+++ b/gcr/gcr-display-view.c
@@ -347,10 +347,6 @@ _gcr_display_view_dispose (GObject *obj)
GcrRenderer *renderer;
GcrDisplayItem *item;
- if (self->pv->buffer)
- g_object_unref (self->pv->buffer);
- self->pv->buffer = NULL;
-
while (self->pv->renderers->len) {
renderer = g_ptr_array_index (self->pv->renderers, 0);
item = g_hash_table_lookup (self->pv->items, renderer);
@@ -361,9 +357,13 @@ _gcr_display_view_dispose (GObject *obj)
g_ptr_array_remove_index_fast (self->pv->renderers, 0);
}
+ if (self->pv->buffer)
+ g_object_unref (self->pv->buffer);
+ self->pv->buffer = NULL;
+
g_assert (g_hash_table_size (self->pv->items) == 0);
- G_OBJECT_CLASS (_gcr_display_view_parent_class)->finalize (obj);
+ G_OBJECT_CLASS (_gcr_display_view_parent_class)->dispose (obj);
}
static void
diff --git a/gcr/tests/ui-test-certificate.c b/gcr/tests/ui-test-certificate.c
index bf12e72..3b741b5 100644
--- a/gcr/tests/ui-test-certificate.c
+++ b/gcr/tests/ui-test-certificate.c
@@ -50,9 +50,9 @@ on_parser_parsed (GcrParser *parser, gpointer unused)
gtk_window_set_default_size (GTK_WINDOW (dialog), 550, 400);
gtk_container_set_border_width (GTK_CONTAINER (dialog), 20);
gtk_dialog_run (dialog);
+ gtk_widget_destroy (GTK_WIDGET (dialog));
g_object_unref (dialog);
- g_object_unref (details);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]