summaryrefslogtreecommitdiff
path: root/src/nautilus-pathbar.c
diff options
context:
space:
mode:
authorCosimo Cecchi <cosimoc@gnome.org>2012-10-19 16:36:48 -0400
committerCosimo Cecchi <cosimoc@gnome.org>2012-10-19 16:36:48 -0400
commit9a122cb3aa4f85548ff036ea3e6509e0e60387f8 (patch)
tree637b89a779337f32ec0d6b02428c6e1618666476 /src/nautilus-pathbar.c
parentb2e8339d9f49770db0f6a523c8bf77b11d7eace3 (diff)
downloadnautilus-9a122cb3aa4f85548ff036ea3e6509e0e60387f8.tar.gz
pathbar: don't assume a mounted mount is always available
We might be refreshing while the mount disappears; in that case, the pathbar will try to get a symbolic icon from a NULL mount, hitting an assertion.
Diffstat (limited to 'src/nautilus-pathbar.c')
-rw-r--r--src/nautilus-pathbar.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/nautilus-pathbar.c b/src/nautilus-pathbar.c
index 0ec082b8c..58020015b 100644
--- a/src/nautilus-pathbar.c
+++ b/src/nautilus-pathbar.c
@@ -1298,9 +1298,13 @@ get_gicon_for_mount (ButtonData *button_data)
GIcon *icon;
GMount *mount;
+ icon = NULL;
mount = nautilus_get_mounted_mount_for_root (button_data->path);
- icon = g_mount_get_symbolic_icon (mount);
- g_object_unref (mount);
+
+ if (mount != NULL) {
+ icon = g_mount_get_symbolic_icon (mount);
+ g_object_unref (mount);
+ }
return icon;
}