summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
c140c75)
Fix 'DEREF_OF_NULL'
- Add null checker
Change-Id: Icb5b8a74bc652a165397df6a7d55920c3c1502e8
Signed-off-by: huiyu.eun <huiyu.eun@samsung.com>
SDL_VideoData* videoData = SDL_GetVideoDevice()->driverdata;
SDL_Window * window = (SDL_Window*)eina_hash_find(videoData->windows, &videoData->indicator_parent_id);
SDL_VideoData* videoData = SDL_GetVideoDevice()->driverdata;
SDL_Window * window = (SDL_Window*)eina_hash_find(videoData->windows, &videoData->indicator_parent_id);
+ if (!window)
+ {
+ SDL_Log("window is null");
+ return ECORE_CALLBACK_PASS_ON;
+ }
+
switch(epcEvent->major)
{
case OP_INDICATOR_INIT:
switch(epcEvent->major)
{
case OP_INDICATOR_INIT:
- Tizen_rotate_update(Tizen_FindWindow(SDL_GetVideoDevice(), window));
+ SDL_Window *sdl_window = Tizen_FindWindow(SDL_GetVideoDevice(), window);
+ if (!sdl_window)
+ {
+ SDL_Log("Rotate error: sdl_window is null");
+ return;
+ }
+
+ Tizen_rotate_update(sdl_window);
{
SDL_VideoData *this = SDL_GetVideoDevice()->driverdata;
SDL_Window * window = (SDL_Window*)eina_hash_find(this->windows, &e->win);
{
SDL_VideoData *this = SDL_GetVideoDevice()->driverdata;
SDL_Window * window = (SDL_Window*)eina_hash_find(this->windows, &e->win);
+ if (!window)
+ {
+ SDL_Log("window is null");
+ return ECORE_CALLBACK_PASS_ON;
+ }
SDL_WindowData *wind = window->driverdata;
SDL_WindowData *wind = window->driverdata;
+ if (!wind)
+ {
+ SDL_Log("window->driverdata is null");
+ return ECORE_CALLBACK_PASS_ON;
+ }
wind->g_res_id = g_res_id;
SDL_Log("[SDL] SDL Window Resource ID %d", g_res_id);
}
wind->g_res_id = g_res_id;
SDL_Log("[SDL] SDL Window Resource ID %d", g_res_id);
}