[UTC][sdl2][Non-ACR]Fix SVACE issues]
authorhuiyu.eun <huiyu.eun@samsung.com>
Fri, 6 Apr 2018 11:40:09 +0000 (20:40 +0900)
committerhuiyu.eun <huiyu.eun@samsung.com>
Fri, 6 Apr 2018 11:46:56 +0000 (20:46 +0900)
Change-Id: Iadcc36cc0bbe29ecb398e2cd90dcffa38a9157e9
Signed-off-by: huiyu.eun <huiyu.eun@samsung.com>
src/utc/sdl2/utc-sdl2.c

index ff4c160..b2489c8 100755 (executable)
@@ -49,8 +49,9 @@ void setArgument(int _argc, char* _argv[])
  */
 void initSDLApp()
 {
-       SDL_tizen_app_init(argc, argv);
-       SDL_SetMainReady();
+       if (SDL_tizen_app_init(argc, argv) == APP_ERROR_NONE) {
+               SDL_SetMainReady();
+       }
 }
 
 /**
@@ -598,10 +599,12 @@ void demo_init_vk(struct demo *demo)
 
     if (gpu_count > 0) {
         VkPhysicalDevice *physical_devices = malloc(sizeof(VkPhysicalDevice) * gpu_count);
-        err = fn_vkEnumeratePhysicalDevices(demo->inst, &gpu_count, physical_devices);
-        printErrMessage(__FUNCTION__, err);
-        demo->gpu = physical_devices[0];
-        free(physical_devices);
+        if (physical_devices) {
+            err = fn_vkEnumeratePhysicalDevices(demo->inst, &gpu_count, physical_devices);
+            printErrMessage(__FUNCTION__, err);
+            demo->gpu = physical_devices[0];
+            free(physical_devices);
+        }
     } else {
         ERR_EXIT("vkEnumeratePhysicalDevices reported zero accessible devices."
                  "\n\nDo you have a compatible Vulkan installable client"