diff options
Diffstat (limited to 'plugins/hfp.c')
-rw-r--r-- | plugins/hfp.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/hfp.c b/plugins/hfp.c index 5e29bba1..d2668e0f 100644 --- a/plugins/hfp.c +++ b/plugins/hfp.c @@ -723,6 +723,10 @@ static int hfp_unregister_ofono_handsfree(struct ofono_modem *modem) static int hfp_probe(struct ofono_modem *modem) { const char *obj_path = ofono_modem_get_path(modem); + struct hfp_data *data = ofono_modem_get_data(modem); + + if (!data) + return -EINVAL; g_dbus_register_interface(connection, obj_path, HFP_AGENT_INTERFACE, agent_methods, NULL, NULL, modem, NULL); |