mirror of git://git.sysmocom.de/ofono
message-waiting: check for NULL argument
This commit is contained in:
parent
12c3cf6969
commit
579a1ebef3
|
@ -926,11 +926,18 @@ static void message_waiting_unregister(struct ofono_atom *atom)
|
||||||
|
|
||||||
void ofono_message_waiting_register(struct ofono_message_waiting *mw)
|
void ofono_message_waiting_register(struct ofono_message_waiting *mw)
|
||||||
{
|
{
|
||||||
DBusConnection *conn = ofono_dbus_get_connection();
|
DBusConnection *conn;
|
||||||
const char *path = __ofono_atom_get_path(mw->atom);
|
const char *path;
|
||||||
struct ofono_modem *modem = __ofono_atom_get_modem(mw->atom);
|
struct ofono_modem *modem;
|
||||||
struct ofono_atom *sim_atom;
|
struct ofono_atom *sim_atom;
|
||||||
|
|
||||||
|
if (mw == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
|
conn = ofono_dbus_get_connection();
|
||||||
|
modem = __ofono_atom_get_modem(mw->atom);
|
||||||
|
path = __ofono_atom_get_path(mw->atom);
|
||||||
|
|
||||||
if (!g_dbus_register_interface(conn, path,
|
if (!g_dbus_register_interface(conn, path,
|
||||||
OFONO_MESSAGE_WAITING_INTERFACE,
|
OFONO_MESSAGE_WAITING_INTERFACE,
|
||||||
message_waiting_methods,
|
message_waiting_methods,
|
||||||
|
|
Loading…
Reference in New Issue