[nautilus/gnome-3-18] nautilus-places-view: sink the reference on creation
- From: Carlos Soriano Sánchez <csoriano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/gnome-3-18] nautilus-places-view: sink the reference on creation
- Date: Fri, 13 Nov 2015 18:10:02 +0000 (UTC)
commit bbfac5f58969903fd3bf12932c14298a833044e2
Author: Carlos Soriano <csoriano gnome org>
Date: Fri Nov 13 18:55:54 2015 +0100
nautilus-places-view: sink the reference on creation
Last patch now makes view reference counting works, however
NautilusFilesView sink the ref on creation, and NautilusPlacesView
was not, making NautilusPlacesView holding a reference less than other
views and making nautilus crash.
Follow what other views do and sink the reference.
src/nautilus-places-view.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/src/nautilus-places-view.c b/src/nautilus-places-view.c
index 1d5db8b..a356263 100644
--- a/src/nautilus-places-view.c
+++ b/src/nautilus-places-view.c
@@ -352,5 +352,12 @@ nautilus_places_view_init (NautilusPlacesView *self)
NautilusPlacesView *
nautilus_places_view_new (void)
{
- return g_object_new (NAUTILUS_TYPE_PLACES_VIEW, NULL);
+ NautilusPlacesView *view;
+
+ view = g_object_new (NAUTILUS_TYPE_PLACES_VIEW, NULL);
+ if (g_object_is_floating (view)) {
+ g_object_ref_sink (view);
+ }
+
+ return view;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]