~ubuntu-branches/ubuntu/vivid/brasero/vivid-proposed

« back to all changes in this revision

Viewing changes to debian/patches/001_hal_null_pointer_dereference.patch

  • Committer: Bazaar Package Importer
  • Author(s): Emilio Pozuelo Monfort, Josselin Mouette, Emilio Pozuelo Monfort
  • Date: 2009-09-05 12:11:18 UTC
  • mfrom: (1.3.2 upstream)
  • mto: (1.5.1 sid)
  • mto: This revision was merged to the branch mainline in revision 72.
  • Revision ID: james.westby@ubuntu.com-20090905121118-zbk0riczqn2is008
Tags: 2.26.3-1
[ Josselin Mouette ]
* Recommend cdrdao. Closes: #525140.
* Only use stable versions in watch file.

[ Emilio Pozuelo Monfort ]
* New upstream bugfix release.
  - Don't hang at normalizing tracks. Closes: #533605.
* debian/watch: Don't uupdate.
* debian/patches/090_relibtoolize.patch: Refreshed.
* debian/patches/001_hal_null_pointer_dereference.patch:
  Patch from Rogério Brito to not crash if hal isn't installed.
  Closes: #539624.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
# Author:
 
3
# Rogério Brito <rbrito@ime.usp.br>
 
4
 
5
# Date: Sun, 09 Aug 2009 08:31:41 -0300
 
6
#
 
7
# Description:
 
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.
 
10
#
 
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,
 
16
                                                    &error);
 
17
-       if (dbus_error_is_set (&error)) {
 
18
+
 
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);
 
24
                return;