X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=src%2Fdevice.c;h=832146fb2ea651b63538ce0cd3d0c64137644ed1;hb=0413d2c1ec2a7d0c80cb4657c4bed22147a3c90e;hp=48f3f7d275043ad79fb7d74a1b55d5a06b665a3f;hpb=888b54002e0ba4e465f0ae1628c475dfc54ffef1;p=connman diff --git a/src/device.c b/src/device.c index 48f3f7d..832146f 100644 --- a/src/device.c +++ b/src/device.c @@ -587,7 +587,7 @@ static void remove_driver(struct connman_element *element, gpointer user_data) connman_bool_t __connman_device_has_driver(struct connman_device *device) { - if (device->driver == NULL) + if (device == NULL || device->driver == NULL) return FALSE; return device->registered;