summaryrefslogtreecommitdiff
path: root/programs/gvfs-mount.c
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2008-01-11 09:29:17 +0000
committerAlexander Larsson <alexl@src.gnome.org>2008-01-11 09:29:17 +0000
commit1c585a81e2828504adfd8d90529dea5ed85b7b67 (patch)
treee1a3201eb3c87be2fafe064fbdb7ff46e8d117b6 /programs/gvfs-mount.c
parent64e052d5b43bcb033187e46aaafea4f867e10a75 (diff)
downloadgvfs-1c585a81e2828504adfd8d90529dea5ed85b7b67.tar.gz
Fix crash if no mount in volume.
2008-01-11 Alexander Larsson <alexl@redhat.com> * programs/gvfs-mount.c (list_volumes): Fix crash if no mount in volume. svn path=/trunk/; revision=1094
Diffstat (limited to 'programs/gvfs-mount.c')
-rw-r--r--programs/gvfs-mount.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/programs/gvfs-mount.c b/programs/gvfs-mount.c
index 8b3e4dd4..28812b6b 100644
--- a/programs/gvfs-mount.c
+++ b/programs/gvfs-mount.c
@@ -326,10 +326,13 @@ list_volumes (GList *volumes,
}
mount = g_volume_get_mount (volume);
- mounts = g_list_prepend (NULL, mount);
- list_mounts (mounts, indent + 2, FALSE);
- g_object_unref (mount);
- g_list_free (mounts);
+ if (mount)
+ {
+ mounts = g_list_prepend (NULL, mount);
+ list_mounts (mounts, indent + 2, FALSE);
+ g_list_free (mounts);
+ g_object_unref (mount);
+ }
}
}