Explorar el Código

Fixed crash if dbus is not accesible

Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
Trial97 hace 1 año
padre
commit
3fa41891cf
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      lib/client_impl.c

+ 1 - 1
lib/client_impl.c

@@ -150,7 +150,7 @@ static int log_error(const char *fmt, ...)
 
 static void hop_off_the_bus(DBusConnection **bus)
 {
-	if (bus == NULL)
+	if (bus == NULL || *bus == NULL)
 		return;
 
 	dbus_connection_unref(*bus);