[SDL_Tizen] Fix svace issue 36/170336/1
authorhuiyu,eun <huiyu.eun@samsung.com>
Mon, 19 Feb 2018 07:47:59 +0000 (16:47 +0900)
committerhuiyu,eun <huiyu.eun@samsung.com>
Mon, 19 Feb 2018 07:57:06 +0000 (16:57 +0900)
Change-Id: I91f08316ec2d666842db92e0f57daba71e594ba2
Signed-off-by: huiyu,eun <huiyu.eun@samsung.com>
src/video/wayland/SDL_waylandmouse.c

index 38b0d31..56aa1cd 100644 (file)
@@ -160,6 +160,12 @@ Wayland_CreateCursor(SDL_Surface *surface, int hot_x, int hot_y)
         SDL_VideoDevice *vd = SDL_GetVideoDevice ();
         SDL_VideoData *wd = (SDL_VideoData *) vd->driverdata;
         Wayland_CursorData *data = calloc (1, sizeof (Wayland_CursorData));
+
+        if (!data) {
+            SDL_OutOfMemory();
+            free(cursor);
+            return NULL;
+        }
         cursor->driverdata = (void *) data;
 
         /* Assume ARGB8888 */