diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2009-11-29 17:26:51 +0100 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2009-11-29 17:26:51 +0100 |
commit | 4ce892180f7cf64e3b485a065d8b2aa4ec771107 (patch) | |
tree | 9df5ac6a8ecc10b31a19f09267cf2abddecc75de /src | |
parent | cc0f4c4ba018ba552fcdd5f4df0cc360fc61e0df (diff) | |
download | connman-4ce892180f7cf64e3b485a065d8b2aa4ec771107.tar.gz connman-4ce892180f7cf64e3b485a065d8b2aa4ec771107.tar.bz2 connman-4ce892180f7cf64e3b485a065d8b2aa4ec771107.zip |
Fix segmentation fault with service type lookup
Diffstat (limited to 'src')
-rw-r--r-- | src/service.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/service.c b/src/service.c index 09b5b5f8..a3a6cf3d 100644 --- a/src/service.c +++ b/src/service.c @@ -1406,6 +1406,9 @@ static void favorite_changed(struct connman_service *service) */ enum connman_service_type connman_service_get_type(struct connman_service *service) { + if (service == NULL) + return CONNMAN_SERVICE_TYPE_UNKNOWN; + return service->type; } |