1
0
Эх сурвалжийг харах

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

The CreateWindow() implementation returned 0 on no more memory instead of -1.
Philipp Wiesemann 10 жил өмнө
parent
commit
8a573844c9

+ 1 - 1
src/video/wayland/SDL_waylandwindow.c

@@ -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;