[brasero/gnome-2-28] When updating the GDrive object associated with the BraseroDrive make sure that priv->gdrive is prop



commit 27813cd1a73a7340080bf34fe0067b7c3ecc710f
Author: Philippe Rouquier <bonfire-app wanadoo fr>
Date:   Sat Oct 17 20:30:29 2009 +0200

    When updating the GDrive object associated with the BraseroDrive make sure that priv->gdrive is properly set if gdrive is NULL and cancel any ongoing GIO operation

 libbrasero-media/brasero-drive.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/libbrasero-media/brasero-drive.c b/libbrasero-media/brasero-drive.c
index e4ef978..03c6b15 100644
--- a/libbrasero-media/brasero-drive.c
+++ b/libbrasero-media/brasero-drive.c
@@ -1051,7 +1051,12 @@ brasero_drive_update_gdrive (BraseroDrive *drive,
 		g_signal_handlers_disconnect_by_func (priv->gdrive,
 						      brasero_drive_medium_gdrive_changed_cb,
 						      drive);
+
+		/* Stop any ongoing GIO operation */
+		g_cancellable_cancel (priv->cancel);
+	
 		g_object_unref (priv->gdrive);
+		priv->gdrive = NULL;
 	}
 
 	BRASERO_MEDIA_LOG ("Setting GDrive %p", gdrive);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]