diff options
author | Carlos Soriano <csoriano@gnome.org> | 2015-11-13 18:55:54 +0100 |
---|---|---|
committer | Carlos Soriano <csoriano@gnome.org> | 2015-11-13 18:58:18 +0100 |
commit | c22b545dcdb3ad9f8ab6daf81215d54ce95aa5cb (patch) | |
tree | 72ad43e3d3e37e937dbee6e3e2126c7d89e04ee2 /src/nautilus-places-view.c | |
parent | f101c34c3dfe555d237c0a67876fc478ca8772a9 (diff) | |
download | nautilus-c22b545dcdb3ad9f8ab6daf81215d54ce95aa5cb.tar.gz |
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.
Diffstat (limited to 'src/nautilus-places-view.c')
-rw-r--r-- | 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 1d5db8bdd..a356263c0 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; } |