From: Young-Ae Kang Date: Wed, 9 Dec 2015 08:41:27 +0000 (+0900) Subject: Changed to check all parameters X-Git-Tag: submit/tizen/20151209.084946^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2a675085bcbb1448b59b7b0bed6559734e5a873a;p=platform%2Fcore%2Fapi%2Fmaps-service.git Changed to check all parameters Change-Id: Ib5e2d77a9988460014d3c1fb0591d0d3548b2c60 --- diff --git a/src/api/maps_address.cpp b/src/api/maps_address.cpp index 921eb66..315ccab 100755 --- a/src/api/maps_address.cpp +++ b/src/api/maps_address.cpp @@ -414,7 +414,7 @@ EXPORT_API int maps_address_list_remove(maps_address_list_h address_list, maps_a EXPORT_API int maps_address_list_get_length(maps_address_list_h address_list, int *length) { - if (!address_list) + if (!address_list || !length) return MAPS_ERROR_INVALID_PARAMETER; *length = g_list_length((GList *)address_list) - 1; diff --git a/src/api/maps_coordinates.cpp b/src/api/maps_coordinates.cpp index 39eb156..70f4862 100755 --- a/src/api/maps_coordinates.cpp +++ b/src/api/maps_coordinates.cpp @@ -244,7 +244,7 @@ EXPORT_API int maps_coordinates_list_remove(maps_coordinates_list_h coordinates_ EXPORT_API int maps_coordinates_list_get_length(maps_coordinates_list_h coordinates_list, int *length) { - if (!coordinates_list) + if (!coordinates_list || !length) return MAPS_ERROR_INVALID_PARAMETER; *length = g_list_length((GList *)coordinates_list) - 1;