diff options
-rw-r--r-- | src/element.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/element.c b/src/element.c index 5b2ecbc7..5025c6db 100644 --- a/src/element.c +++ b/src/element.c @@ -399,13 +399,10 @@ static DBusMessage *do_disable(DBusConnection *conn, DBG("conn %p", conn); - if (element->driver == NULL) - return g_dbus_create_reply(msg, DBUS_TYPE_INVALID); - if (element->enabled == FALSE) return g_dbus_create_reply(msg, DBUS_TYPE_INVALID); - if (element->driver->disable) { + if (element->driver && element->driver->disable) { DBG("Calling disable callback"); element->driver->disable(element); } |