[brasero] Should fix #591826 – nautilus crashed with SIGSEGV in strcmp()
- From: Philippe Rouquier <philippr src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [brasero] Should fix #591826 – nautilus crashed with SIGSEGV in strcmp()
- Date: Fri, 14 Aug 2009 18:58:20 +0000 (UTC)
commit c255543c0717aadfa54cde2b50e4a756621f025a
Author: Philippe Rouquier <bonfire-app wanadoo fr>
Date: Fri Aug 14 20:54:41 2009 +0200
Should fix #591826 â?? nautilus crashed with SIGSEGV in strcmp()
g_volume_get_identifier () can return NULL device.
libbrasero-media/brasero-medium-monitor.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/libbrasero-media/brasero-medium-monitor.c b/libbrasero-media/brasero-medium-monitor.c
index c565d25..4bfe9dd 100644
--- a/libbrasero-media/brasero-medium-monitor.c
+++ b/libbrasero-media/brasero-medium-monitor.c
@@ -104,6 +104,7 @@ brasero_medium_monitor_get_drive (BraseroMediumMonitor *monitor,
BraseroMediumMonitorPrivate *priv;
g_return_val_if_fail (monitor != NULL, NULL);
+ g_return_val_if_fail (device != NULL, NULL);
g_return_val_if_fail (BRASERO_IS_MEDIUM_MONITOR (monitor), NULL);
priv = BRASERO_MEDIUM_MONITOR_PRIVATE (monitor);
@@ -437,6 +438,9 @@ brasero_medium_monitor_volume_added_cb (GVolumeMonitor *monitor,
}
device = g_volume_get_identifier (gvolume, G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE);
+ if (!device)
+ return;
+
brasero_medium_monitor_device_added (self, device, NULL);
g_free (device);
}
@@ -553,6 +557,9 @@ brasero_medium_monitor_volume_removed_cb (GVolumeMonitor *monitor,
}
device = g_volume_get_identifier (gvolume, G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE);
+ if (!device)
+ return;
+
brasero_medium_monitor_device_removed (self, device, NULL);
g_free (device);
}
@@ -627,6 +634,8 @@ brasero_medium_monitor_init (BraseroMediumMonitor *object)
gvolume = iter->data;
device = g_volume_get_identifier (gvolume, G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE);
+ if (!device)
+ continue;
/* make sure it isn't already in our list */
drive = brasero_medium_monitor_get_drive (object, device);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]