mm-origin: Don't crash when Modem has no location services
When no locationservice is available the API can return `NULL` without setting an error. Closes: https://gitlab.gnome.org/GNOME/calls/-/issues/641 Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/728>
This commit is contained in:
@@ -652,6 +652,7 @@ on_modem_location_get_3gpp_finish (GObject *source_object, GAsyncResult *res, gp
|
|||||||
|
|
||||||
location_3gpp = mm_modem_location_get_3gpp_finish (location, res, &err);
|
location_3gpp = mm_modem_location_get_3gpp_finish (location, res, &err);
|
||||||
if (!location_3gpp) {
|
if (!location_3gpp) {
|
||||||
|
if (err)
|
||||||
g_warning ("Failed to get 3gpp location service: %s", err->message);
|
g_warning ("Failed to get 3gpp location service: %s", err->message);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user