3
# Rogério Brito <rbrito@ime.usp.br>
5
# Date: Sun, 09 Aug 2009 08:31:41 -0300
8
# libbrasero-media does not check properly if a null-pointer is returned
9
# when checking for devices found by libhal. This makes the check stricter.
11
--- a/libbrasero-media/brasero-medium-monitor.c
12
+++ b/libbrasero-media/brasero-medium-monitor.c
13
@@ -437,7 +437,10 @@ brasero_medium_monitor_init (BraseroMedi
14
devices = libhal_find_device_by_capability (ctx,
15
"storage.cdrom", &nb_devices,
17
- if (dbus_error_is_set (&error)) {
19
+ /* if hal is not present, devices *CAN* be NULL (and *does*, sometimes).
20
+ * -- Rogerio Brito <rbrito@ime.usp.br> */
21
+ if (devices == NULL || dbus_error_is_set (&error)) {
22
BRASERO_MEDIA_LOG ("Hal is not running : %s\n", error.message);
23
dbus_error_free (&error);