device: cope with devices' failure to provide reason for incompatibility

Pretty sure we get this right now, but if we don't let's fail more
sensibly.
This commit is contained in:
Lubomir Rintel 2018-08-14 18:13:57 +02:00
parent 587de11903
commit 304e211640

View file

@ -13432,6 +13432,7 @@ _nm_device_check_connection_available (NMDevice *self,
if (!nm_device_check_connection_compatible (self, connection,
error ? &local : NULL)) {
if (error) {
g_return_val_if_fail (local, FALSE);
nm_utils_error_set (error,
local->domain == NM_UTILS_ERROR
? local->code