From b4d28085bfea2475e3028a4962e022b86f43011a Mon Sep 17 00:00:00 2001
From: Simon McVittie <[EMAIL REDACTED]>
Date: Thu, 24 Mar 2022 18:30:32 +0000
Subject: [PATCH] wayland: Don't overwrite error message from
SDL_EGL_CreateSurface
SDL_EGL_CreateSurface sets a more specific error message, so overwriting
it would lose information.
Signed-off-by: Simon McVittie <smcv@collabora.com>
---
src/video/wayland/SDL_waylandwindow.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/video/wayland/SDL_waylandwindow.c b/src/video/wayland/SDL_waylandwindow.c
index 635546af449..1bb5159eba9 100644
--- a/src/video/wayland/SDL_waylandwindow.c
+++ b/src/video/wayland/SDL_waylandwindow.c
@@ -1325,7 +1325,7 @@ int Wayland_CreateWindow(_THIS, SDL_Window *window)
data->egl_surface = SDL_EGL_CreateSurface(_this, (NativeWindowType) data->egl_window);
if (data->egl_surface == EGL_NO_SURFACE) {
- return SDL_SetError("failed to create an EGL window surface");
+ return -1; /* SDL_EGL_CreateSurface should have set error */
}
#endif
}