[brasero] Avoid in rare cases (using valgrind mostly) to set error twice for GIO operations



commit 29071cec054ca571ec20c6206821c3d945c8f873
Author: Philippe Rouquier <bonfire-app wanadoo fr>
Date:   Sat Oct 17 15:54:29 2009 +0200

    Avoid in rare cases (using valgrind mostly) to set error twice for GIO operations

 libbrasero-media/brasero-drive.c         |    2 +-
 libbrasero-media/brasero-gio-operation.c |    3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/libbrasero-media/brasero-drive.c b/libbrasero-media/brasero-drive.c
index faa9b98..5c5afb0 100644
--- a/libbrasero-media/brasero-drive.c
+++ b/libbrasero-media/brasero-drive.c
@@ -282,7 +282,7 @@ brasero_drive_eject (BraseroDrive *drive,
 
 	BRASERO_MEDIA_LOG ("Trying to eject drive");
 	if (priv->gdrive) {
-		/*Wait for any ongoing probing as it
+		/* Wait for any ongoing probing as it
 		 * would prevent the door from being
 		 * opened. */
 		brasero_drive_wait_probing_thread (drive);
diff --git a/libbrasero-media/brasero-gio-operation.c b/libbrasero-media/brasero-gio-operation.c
index a9ca2c4..1ec1bef 100644
--- a/libbrasero-media/brasero-gio-operation.c
+++ b/libbrasero-media/brasero-gio-operation.c
@@ -148,13 +148,14 @@ brasero_gio_operation_wait_for_operation_end (BraseroGioOperation *operation,
 			g_error_free (operation->error);
 			operation->error = NULL;
 		}
-		else if (error)
+		else if (error && (*error) == NULL)
 			g_propagate_error (error, operation->error);
 		else
 			g_error_free (operation->error);
 
 		operation->error = NULL;
 	}
+
 	g_cancellable_reset (operation->cancel);
 	g_object_unref (operation->cancel);
 



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