Module: wine Branch: master Commit: 3110b72e12a2dba79a3993fe6511351a97ce1917 URL: https://gitlab.winehq.org/wine/wine/-/commit/3110b72e12a2dba79a3993fe6511351...
Author: Alexandre Julliard julliard@winehq.org Date: Wed Aug 17 16:45:57 2022 +0200
mountmgr: Don't crash if connecting to dbus fails.
---
dlls/mountmgr.sys/dbus.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/dlls/mountmgr.sys/dbus.c b/dlls/mountmgr.sys/dbus.c index 051f735b219..cc115751a19 100644 --- a/dlls/mountmgr.sys/dbus.c +++ b/dlls/mountmgr.sys/dbus.c @@ -600,6 +600,9 @@ static DBusMessage *device_by_iface_request( const char *iface ) DBusMessage *request, *reply; DBusMessageIter iter; DBusError error; + DBusConnection *connection = get_dhcp_connection(); + + if (!connection) return NULL;
request = p_dbus_message_new_method_call( "org.freedesktop.NetworkManager", "/org/freedesktop/NetworkManager", "org.freedesktop.NetworkManager", "GetDeviceByIpIface" ); @@ -609,7 +612,7 @@ static DBusMessage *device_by_iface_request( const char *iface ) p_dbus_message_iter_append_basic( &iter, DBUS_TYPE_STRING, &iface );
p_dbus_error_init( &error ); - reply = p_dbus_connection_send_with_reply_and_block( get_dhcp_connection(), request, -1, &error ); + reply = p_dbus_connection_send_with_reply_and_block( connection, request, -1, &error ); p_dbus_message_unref( request ); if (!reply) {