[Xfce4-commits] <thunar:nick/new-shortcuts-pane-model> Fix unmounting devices.
Nick Schermer
noreply at xfce.org
Fri Oct 5 23:28:01 CEST 2012
Updating branch refs/heads/nick/new-shortcuts-pane-model
to 437ac8fa86b1c41ea5ea9bab92aa74498f584d7c (commit)
from db9592e261de7b72119b2665e2881f8a23211525 (commit)
commit 437ac8fa86b1c41ea5ea9bab92aa74498f584d7c
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