Skip to content
Permalink
Browse files
Avoid potential crash when dbus disappears
Signed-off-by: Philippe De Swert <philippe.deswert@jollamobile.com>
  • Loading branch information
philippedeswert committed May 22, 2014
1 parent 69ee14d commit 1bf43cf3b650cfb3aadedf82a9dc0a1f44d518e4
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/usb_moded-dbus.c
@@ -309,6 +309,11 @@ static int usb_moded_dbus_signal(const char *signal_type, const char *content)
int result = 1;
DBusMessage* msg = 0;

if(!dbus_connection_sys)
{
log_err("Dbus system connection broken!\n");
goto EXIT;
}
// create a signal and check for errors
msg = dbus_message_new_signal(USB_MODE_OBJECT, USB_MODE_INTERFACE, signal_type );
if (NULL == msg)

0 comments on commit 1bf43cf

Please sign in to comment.