fix bug for Null request_id 30/91930/1
authorjomui <jongmun.woo@samsung.com>
Wed, 12 Oct 2016 07:52:44 +0000 (16:52 +0900)
committerjomui <jongmun.woo@samsung.com>
Wed, 12 Oct 2016 07:53:09 +0000 (16:53 +0900)
Signed-off-by: jomui <jongmun.woo@samsung.com>
Change-Id: I9a0c6b92b0b5891aeb45f285cd81f2858f4619c0

src/mapzen_plugin.c

index ee15181..a6bb44d 100644 (file)
@@ -877,11 +877,11 @@ static void __mapzen_route_cb(mapzen_error_e result, int request_id, mapzen_rout
 EXPORT_API int maps_plugin_search_route(const maps_coordinates_h origin,
                const maps_coordinates_h destination, maps_preference_h preference,
                maps_service_search_route_cb callback, void *user_data, int *request_id) {
-       MAPS_LOGD(">>>>> START maps_plugin_search_route: request_id=%d", *request_id);
-
        if (!origin || !destination || !callback || !request_id)
                return MAPS_ERROR_INVALID_PARAMETER;
 
+       MAPS_LOGD(">>>>> START maps_plugin_search_route: request_id=%d", *request_id);
+
        callback_info_route *calldata_route = (callback_info_route *)g_malloc0(sizeof(callback_info_route));
        if (calldata_route == NULL)
                MAPS_PRINT_ERROR_CODE_RETURN(MAPS_ERROR_OUT_OF_MEMORY);