From: Marcel Holtmann Date: Mon, 5 Jan 2009 01:09:51 +0000 (+0100) Subject: Check for invalid devices first X-Git-Tag: 2.0_alpha~4159 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0413d2c1ec2a7d0c80cb4657c4bed22147a3c90e;p=framework%2Fconnectivity%2Fconnman.git Check for invalid devices first --- 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;