diff options
author | António Fernandes <antoniof@gnome.org> | 2020-12-17 18:40:18 +0000 |
---|---|---|
committer | Ondrej Holy <oholy@redhat.com> | 2020-12-22 09:58:52 +0000 |
commit | 82e8545fc156dd0a353e868757aaa861e26546f0 (patch) | |
tree | 234e784ea4562939909e4d46adecf6ed1c563d2d /src/nautilus-properties-window.c | |
parent | 791ccf838056c03c7ae40ad9deafc15fb3aae126 (diff) | |
download | nautilus-82e8545fc156dd0a353e868757aaa861e26546f0.tar.gz |
properties-window: Set boolean object data correctly
It's wrong to set a pointer to an object as data without incrementing
its refcount.
But there is actually no need to pass a real pointer as data here, as
we actually want a boolean.
Use a pointer conversion macros instead.
Diffstat (limited to 'src/nautilus-properties-window.c')
-rw-r--r-- | src/nautilus-properties-window.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nautilus-properties-window.c b/src/nautilus-properties-window.c index 05b00d67f..d9c980fa8 100644 --- a/src/nautilus-properties-window.c +++ b/src/nautilus-properties-window.c @@ -944,7 +944,7 @@ clear_extension_pages (NautilusPropertiesWindow *self) page = gtk_notebook_get_nth_page (GTK_NOTEBOOK (self->notebook), i); - if (g_object_get_data (G_OBJECT (page), "is-extension-page")) + if (GPOINTER_TO_INT (g_object_get_data (G_OBJECT (page), "is-extension-page"))) { gtk_notebook_remove_page (GTK_NOTEBOOK (self->notebook), i); @@ -4338,7 +4338,7 @@ append_extension_pages (NautilusPropertiesWindow *self) g_object_set_data (G_OBJECT (page_widget), "is-extension-page", - page); + GINT_TO_POINTER (TRUE)); g_object_unref (page_widget); g_object_unref (label); |