[gnome-disk-utility/gnome-2-28] Nautilus extension: ref and unref objects correctly
- From: Tomas Bzatek <tbzatek src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-disk-utility/gnome-2-28] Nautilus extension: ref and unref objects correctly
- Date: Tue, 13 Oct 2009 14:54:39 +0000 (UTC)
commit 5abc8ac135ec753fbf6deb3c3cd3b36b0b7c100b
Author: Tomas Bzatek <tbzatek redhat com>
Date: Tue Oct 13 16:51:11 2009 +0200
Nautilus extension: ref and unref objects correctly
Save reference to device as long as the menu item lives.
This caused random Nautilus crashes on device removal.
src/nautilus-extension/nautilus-gdu.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/nautilus-extension/nautilus-gdu.c b/src/nautilus-extension/nautilus-gdu.c
index 8f69bda..196431f 100644
--- a/src/nautilus-extension/nautilus-gdu.c
+++ b/src/nautilus-extension/nautilus-gdu.c
@@ -227,8 +227,8 @@ nautilus_gdu_get_file_items (NautilusMenuProvider *provider,
"nautilus-gdu");
g_object_set_data_full (G_OBJECT (item),
"gdu-device",
- device,
- (GDestroyNotify) g_object_ref);
+ g_object_ref (device),
+ (GDestroyNotify) g_object_unref);
g_object_set_data_full (G_OBJECT (item),
"nautilus-file",
g_object_ref (nautilus_file),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]