diff options
author | Dan Williams <dcbw@redhat.com> | 2013-03-25 15:03:59 -0500 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2013-03-25 15:08:31 -0500 |
commit | 8ebce66f966c18bea0114206bcfeacdc08023c84 (patch) | |
tree | 3a5db5be0c2f2a187cf19267e8fd333cdafcd344 | |
parent | 14bb687b946380e03c6c6e482f14c0374e50ac18 (diff) |
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.
-rw-r--r-- | plugins/sierra/mm-broadband-modem-sierra.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/sierra/mm-broadband-modem-sierra.c b/plugins/sierra/mm-broadband-modem-sierra.c index 51ca7028..7a8ba0c1 100644 --- a/plugins/sierra/mm-broadband-modem-sierra.c +++ b/plugins/sierra/mm-broadband-modem-sierra.c @@ -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); |