*/
void initSDLApp()
{
- SDL_tizen_app_init(argc, argv);
- SDL_SetMainReady();
+ if (SDL_tizen_app_init(argc, argv) == APP_ERROR_NONE) {
+ SDL_SetMainReady();
+ }
}
/**
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"