From 8ebce66f966c18bea0114206bcfeacdc08023c84 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Mon, 25 Mar 2013 15:03:59 -0500 Subject: [PATCH] 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. --- plugins/sierra/mm-broadband-modem-sierra.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);