Wayland: Fixed accessing not fully initialized window if no memory available.
authorPhilipp Wiesemann <philipp.wiesemann@arcor.de>
Thu, 09 Apr 2015 21:11:43 +0200
changeset 9483c79f20abeb1a
parent 9482 1f1da7a530ab
child 9484 8828b1a0ab67
Wayland: Fixed accessing not fully initialized window if no memory available.

The CreateWindow() implementation returned 0 on no more memory instead of -1.
src/video/wayland/SDL_waylandwindow.c
     1.1 --- a/src/video/wayland/SDL_waylandwindow.c	Wed Apr 08 22:24:33 2015 +0200
     1.2 +++ b/src/video/wayland/SDL_waylandwindow.c	Thu Apr 09 21:11:43 2015 +0200
     1.3 @@ -147,7 +147,7 @@
     1.4  
     1.5      data = calloc(1, sizeof *data);
     1.6      if (data == NULL)
     1.7 -        return 0;
     1.8 +        return SDL_OutOfMemory();
     1.9  
    1.10      c = _this->driverdata;
    1.11      window->driverdata = data;