From: Martin Xu <[email protected]>

---
 plugins/ofono.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/plugins/ofono.c b/plugins/ofono.c
index 02d4770..50ed370 100644
--- a/plugins/ofono.c
+++ b/plugins/ofono.c
@@ -718,6 +718,9 @@ static void modem_roaming_changed(struct modem_data *modem,
        GHashTableIter i;
        gpointer value;
 
+       if (device == NULL)
+               return;
+
        connman_device_set_string(device, "RegistrationStatus", status);
 
        if (g_str_equal(status, "roaming"))
@@ -727,9 +730,6 @@ static void modem_roaming_changed(struct modem_data *modem,
        else
                return;
 
-       if (device == NULL)
-               return;
-
        for (g_hash_table_iter_init(&i, network_hash);
             g_hash_table_iter_next(&i, NULL, &value);) {
                struct connman_network *network = value;
-- 
1.6.1.3

_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman

Reply via email to