[TSAM-2363 TSAM-234]Added NULL check on app control data get 78/67878/1 accepted/tizen/mobile/20160501.121121 submit/tizen_mobile/20160429.153615
authorRahul Dadhich <r.dadhich@samsung.com>
Fri, 29 Apr 2016 04:14:32 +0000 (09:44 +0530)
committerRahul Dadhich <r.dadhich@samsung.com>
Fri, 29 Apr 2016 04:14:32 +0000 (09:44 +0530)
Change-Id: Id977d1109c54a39a75201f70820b5bf721dbc08e
Signed-off-by: Rahul Dadhich <r.dadhich@samsung.com>
src/gallery-efl.c

index ed1f3d3..33208b9 100644 (file)
@@ -366,7 +366,11 @@ static int _ge_parse_param(ge_ugdata *ugd, app_control_h service)
                char *total_size = NULL;
                int ret = app_control_get_extra_data(service, "http://tizen.org/appcontrol/data/total_size", &(total_size));
                if (ret != APP_CONTROL_ERROR_NONE) {
-                       ugd->limitsize = atol(total_size);
+                       if(total_size) {
+                               ugd->limitsize = atol(total_size);
+                       } else {
+                               ugd->limitsize = -1;
+                       }
                } else {
                        ugd->limitsize = -1;
                }
@@ -382,9 +386,10 @@ static int _ge_parse_param(ge_ugdata *ugd, app_control_h service)
                }
                GE_FREE(select_mode);
        }
-       if (launch_type == NULL)
+       if (launch_type == NULL) {
                app_control_get_extra_data(service, GE_BUNDLE_LAUNCH_TYPE,
                                           &launch_type);
+       }
        if (launch_type == NULL) {
                if (operation &&
                        !strcasecmp(operation, APP_CONTROL_OPERATION_PICK)) {