summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gnss.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gnss.c b/src/gnss.c
index 20552d21..37f93ecf 100644
--- a/src/gnss.c
+++ b/src/gnss.c
@@ -230,6 +230,9 @@ static DBusMessage *gnss_send_element(DBusConnection *conn,
DBUS_TYPE_INVALID))
return __ofono_error_invalid_args(msg);
+ if (gnss->posr_agent == NULL)
+ return __ofono_error_not_available(msg);
+
if (!gnss_agent_sender_matches(gnss->posr_agent, caller))
return __ofono_error_access_denied(msg);