Commit ddb02141 authored by Keith Preston's avatar Keith Preston

Bug 16161 - Don't crash when network info is empty

parent 6d2fc89c
......@@ -179,6 +179,10 @@ static gboolean geoclue_gsmloc_get_cell (GeoclueGsmloc *gsmloc,
}
strings = g_strsplit (netinfo.NetworkCode, " ", 2);
if (!strings[0] || !strings[1]) {
g_strfreev (strings);
return FALSE;
}
*mcc = strings[0];
*mnc = strings[1];
g_free (strings);
......@@ -186,7 +190,6 @@ static gboolean geoclue_gsmloc_get_cell (GeoclueGsmloc *gsmloc,
*lac = g_strdup_printf ("%d", i_lac);
*cid = g_strdup_printf ("%d", i_cid);
/* TODO should make sure all return values have data? */
return TRUE;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment