diff --git a/src/devices/wwan/nm-modem-broadband.c b/src/devices/wwan/nm-modem-broadband.c index 3fd94586a9..40cf32c772 100644 --- a/src/devices/wwan/nm-modem-broadband.c +++ b/src/devices/wwan/nm-modem-broadband.c @@ -66,6 +66,8 @@ translate_mm_error (GError *error) { NMDeviceStateReason reason; + g_return_val_if_fail (error != NULL, NM_DEVICE_STATE_REASON_UNKNOWN); + if (g_error_matches (error, MM_CONNECTION_ERROR, MM_CONNECTION_ERROR_NO_CARRIER)) reason = NM_DEVICE_STATE_REASON_MODEM_NO_CARRIER; else if (g_error_matches (error, MM_CONNECTION_ERROR, MM_CONNECTION_ERROR_NO_DIALTONE)) diff --git a/src/nm-manager.c b/src/nm-manager.c index 64c31c89dc..52a01895e8 100644 --- a/src/nm-manager.c +++ b/src/nm-manager.c @@ -3081,6 +3081,7 @@ _activation_auth_done (NMActiveConnection *active, error_desc); } + g_assert (error); dbus_g_method_return_error (context, error); _internal_activation_failed (self, active, error->message); g_object_unref (active); @@ -3227,6 +3228,7 @@ activation_add_done (NMSettings *self, error = local; } + g_assert (error); _internal_activation_failed (info->manager, info->active, error->message); dbus_g_method_return_error (context, error); g_clear_error (&local);