diff options
author | Marco Trevisan <mail@3v1n0.net> | 2018-03-14 17:45:49 +0000 |
---|---|---|
committer | Marco Trevisan <mail@3v1n0.net> | 2018-03-16 01:38:52 +0000 |
commit | b98c77ffceedfcbb7f3671b9206153acf89225e8 (patch) | |
tree | bcca87e70c44106d4fd469696bfaad0caa7c1cb0 | |
parent | 02a8a491a397a42e342f1745a5074194d524113f (diff) | |
download | nautilus-b98c77ffceedfcbb7f3671b9206153acf89225e8.tar.gz |
Merge branch 'prevent-ref-unreffed-selection' into 'master'
file-view: prevent ref unreffed pending selection objects
Closes #295
See merge request GNOME/nautilus!139
(cherry picked from commit af9d19d430aa2f007c6865478d6190fe1f791882)
115acfb9 file-view: prevent ref unreffed pending selection objects
-rw-r--r-- | src/nautilus-files-view.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c index 1d964e943..0175e689b 100644 --- a/src/nautilus-files-view.c +++ b/src/nautilus-files-view.c @@ -3031,6 +3031,7 @@ nautilus_files_view_set_selection (NautilusView *nautilus_files_view, { NautilusFilesView *view; NautilusFilesViewPrivate *priv; + GList *pending_selection; view = NAUTILUS_FILES_VIEW (nautilus_files_view); priv = nautilus_files_view_get_instance_private (view); @@ -3048,9 +3049,11 @@ nautilus_files_view_set_selection (NautilusView *nautilus_files_view, /* If we are still loading, set the list of pending URIs instead. * done_loading() will eventually select the pending URIs and reveal them. */ + pending_selection = g_list_copy_deep (selection, + (GCopyFunc) g_object_ref, NULL); g_list_free_full (priv->pending_selection, g_object_unref); - priv->pending_selection = - g_list_copy_deep (selection, (GCopyFunc) g_object_ref, NULL); + + priv->pending_selection = pending_selection; } } |