sierra: fix time check warnings for modems that don't support time

'result' may be NULL even if no error is set.  Errors aren't set
because we want to continue the !TIME/!SYSTIME sequence regardless
of errors, so we can figure out which command the modem supports.

Trying to get a uint32 out of a NULL GVariant makes glib complain,
and it's wrong, so don't do that.
This commit is contained in:
Dan Williams
2013-03-25 15:03:59 -05:00
parent 14bb687b94
commit 8ebce66f96

View File

@@ -1337,7 +1337,7 @@ modem_time_check_ready (MMBaseModem *self,
g_simple_async_result_set_op_res_gboolean (simple, FALSE);
result = mm_base_modem_at_sequence_finish (self, res, NULL, &error);
if (!error) {
if (!error && result) {
MMBroadbandModemSierra *sierra = MM_BROADBAND_MODEM_SIERRA (self);
sierra->priv->time_method = g_variant_get_uint32 (result);