[Xfce4-commits] <thunar:master> Fix unmounting devices.
Nick Schermer
noreply at xfce.org
Sat Oct 13 16:12:10 CEST 2012
Updating branch refs/heads/master
to 8bd14af8f0b10b6477c56b5652c2685f1b0b8207 (commit)
from fdb1e49e2c80c52b7a6ad110d965bc6205752678 (commit)
commit 8bd14af8f0b10b6477c56b5652c2685f1b0b8207
Author: Nick Schermer <nick at xfce.org>
Date: Fri Oct 5 23:27:35 2012 +0200
Fix unmounting devices.
thunar/thunar-shortcuts-model.c | 8 ++++++--
thunar/thunar-shortcuts-view.c | 2 +-
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/thunar/thunar-shortcuts-model.c b/thunar/thunar-shortcuts-model.c
index de204a1..255ca6e 100644
--- a/thunar/thunar-shortcuts-model.c
+++ b/thunar/thunar-shortcuts-model.c
@@ -1499,8 +1499,10 @@ thunar_shortcuts_model_mount_changed (GVolumeMonitor *volume_monitor,
if (THUNAR_SHORTCUT (lp->data)->mount == mount)
break;
+ if (lp == NULL)
+ return;
+
/* something is broken if we don't have a shortcut here */
- _thunar_assert (lp != NULL);
_thunar_assert (THUNAR_SHORTCUT (lp->data)->mount == mount);
/* generate an iterator for the path */
@@ -1587,8 +1589,10 @@ thunar_shortcuts_model_mount_removed (GVolumeMonitor *volume_monitor,
if (THUNAR_SHORTCUT (lp->data)->mount == mount)
break;
+ if (lp == NULL)
+ return;
+
/* something is broken if we don't have a shortcut here */
- _thunar_assert (lp != NULL);
_thunar_assert (THUNAR_SHORTCUT (lp->data)->mount == mount);
/* drop the shortcut from the model */
diff --git a/thunar/thunar-shortcuts-view.c b/thunar/thunar-shortcuts-view.c
index 91802d9..11f76c4 100644
--- a/thunar/thunar-shortcuts-view.c
+++ b/thunar/thunar-shortcuts-view.c
@@ -1767,7 +1767,7 @@ thunar_shortcuts_view_disconnect (ThunarShortcutsView *view)
#endif
/* try unmounting the mount */
- g_mount_unmount_with_operation (mount,
+ g_mount_unmount_with_operation (volume_mount,
G_MOUNT_UNMOUNT_NONE,
mount_operation,
NULL,
More information about the Xfce4-commits
mailing list