Wayland: Fixed accessing not fully initialized window if no memory available.

The CreateWindow() implementation returned 0 on no more memory instead of -1.
This commit is contained in:
Philipp Wiesemann 2015-04-09 21:11:43 +02:00
parent 049ef9a35b
commit 8a573844c9
1 changed files with 1 additions and 1 deletions

View File

@ -147,7 +147,7 @@ int Wayland_CreateWindow(_THIS, SDL_Window *window)
data = calloc(1, sizeof *data); data = calloc(1, sizeof *data);
if (data == NULL) if (data == NULL)
return 0; return SDL_OutOfMemory();
c = _this->driverdata; c = _this->driverdata;
window->driverdata = data; window->driverdata = data;