diff options
author | Alexander Larsson <alexl@redhat.com> | 2008-01-11 09:29:17 +0000 |
---|---|---|
committer | Alexander Larsson <alexl@src.gnome.org> | 2008-01-11 09:29:17 +0000 |
commit | 1c585a81e2828504adfd8d90529dea5ed85b7b67 (patch) | |
tree | e1a3201eb3c87be2fafe064fbdb7ff46e8d117b6 /programs/gvfs-mount.c | |
parent | 64e052d5b43bcb033187e46aaafea4f867e10a75 (diff) | |
download | gvfs-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.c | 11 |
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); + } } } |