[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/KDE/3.5/kdebase/kioslave/media/mediamanager
From:       Andreas Kling <kling () impul ! se>
Date:       2006-07-26 8:18:43
Message-ID: 1153901923.708409.26573.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 566466 by kling:

Check the return value from dbus_connection_open_private().
Fixes KDED crashing on startup when D-BUS is unavailable.

If at all possible, this should go into 3.5.4.

CCMAIL: coolo@kde.org


 M  +8 -0      halbackend.cpp  


--- branches/KDE/3.5/kdebase/kioslave/media/mediamanager/halbackend.cpp #566465:566466
@@ -112,6 +112,14 @@
     DBusError error;
     dbus_error_init(&error);
     dbus_connection = dbus_connection_open_private(DBUS_SYSTEM_BUS, &error);
+
+    if (!dbus_connection || dbus_error_is_set(&error)) {
+        dbus_error_free(&error);
+        libhal_ctx_free(m_halContext);
+        m_halContext = NULL;
+        return false;
+    }
+
     dbus_bus_register(dbus_connection, &error);
 
     if (dbus_error_is_set(&error)) {
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic