Skip to content

Commit

Permalink
Wayland: Fixed accessing not fully initialized window if no memory av…
Browse files Browse the repository at this point in the history
…ailable.

The CreateWindow() implementation returned 0 on no more memory instead of -1.
  • Loading branch information
philippwiesemann committed Apr 9, 2015
1 parent 049ef9a commit 8a57384
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/video/wayland/SDL_waylandwindow.c
Expand Up @@ -147,7 +147,7 @@ int Wayland_CreateWindow(_THIS, SDL_Window *window)

data = calloc(1, sizeof *data);
if (data == NULL)
return 0;
return SDL_OutOfMemory();

c = _this->driverdata;
window->driverdata = data;
Expand Down

0 comments on commit 8a57384

Please sign in to comment.