[Goodies-commits] r4992 - xfburn/trunk/xfburn

David Mohr squisher at xfce.org
Wed Jun 25 03:35:32 CEST 2008


Author: squisher
Date: 2008-06-25 01:35:32 +0000 (Wed, 25 Jun 2008)
New Revision: 4992

Modified:
   xfburn/trunk/xfburn/xfburn-hal-manager.c
Log:
Additional hal error check

Modified: xfburn/trunk/xfburn/xfburn-hal-manager.c
===================================================================
--- xfburn/trunk/xfburn/xfburn-hal-manager.c	2008-06-24 18:38:30 UTC (rev 4991)
+++ xfburn/trunk/xfburn/xfburn-hal-manager.c	2008-06-25 01:35:32 UTC (rev 4992)
@@ -134,10 +134,13 @@
     hal_context = libhal_ctx_new ();
     if (G_LIKELY (hal_context != NULL)) {
       /* setup the D-Bus connection for the HAL context */
-      libhal_ctx_set_dbus_connection (hal_context, dbus_connection);
+      if (libhal_ctx_set_dbus_connection (hal_context, dbus_connection)) {
 
-      /* try to initialize the HAL context */
-      libhal_ctx_init (hal_context, &derror);
+        /* try to initialize the HAL context */
+        libhal_ctx_init (hal_context, &derror);
+      } else {
+        dbus_set_error_const (&derror, DBUS_ERROR_NO_MEMORY, g_strerror (ENOMEM));
+      }
     } else {
       /* record the allocation failure of the context */
       dbus_set_error_const (&derror, DBUS_ERROR_NO_MEMORY, g_strerror (ENOMEM));




More information about the Goodies-commits mailing list