libnvidia-egl-wayland/0003-egl-wayland-Handle-failure-to-acquire-image-in-wlEgl.patch
Stefan Dirsch a8e4d8adaf - update to 1.1.17 tarball; no source code changes; actually we
had 1.1.7 before without noticing it ...
- supersedes 
  * 0001-egl-wayland-bump-version-to-1.1.17.patch
  * 0002-Fix-the-include-path-for-drm_fourcc.h.patch
  * 0003-Fix-a-declaration-after-code.patch
  * 0004-egl-swap-provide-damage-rectangles-to-wl_surface.patch
  * 0005-Use-INT32_MAX-for-wl_surface_damage.patch
  * 0006-egl-wayland-Accept-device-name-from-either-wl_drm-or.patch
  * 0007-egl-wayland-fix-device-name-case-where-only-wl_drm-e.patch
  * 0008-Add-ICD-json-file.patch
  * 0009-egl-wayland-Fix-roundtrip-eating-wl_drm-events-in-ge.patch
  * 0001-egl-wayland-enable-CI-with-github-actions.patch
  * 0002-egl-wayland-Fix-use-after-free-in-library-teardown.patch
  * 0003-egl-wayland-Handle-failure-to-acquire-image-in-wlEgl.patch
  * 0001-Fix-a-segfault-in-wlEglCreatePlatformWindowSurfaceHo.patch
  * 0002-Check-for-a-duplicate-wl_surface-in-wlEglCreatePlatf.patch

OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/libnvidia-egl-wayland?expand=0&rev=35
2024-12-11 22:26:44 +00:00

41 lines
1.3 KiB
Diff

From 218f67846472c9310355210ee9a7e1fabed95062 Mon Sep 17 00:00:00 2001
From: shiningdracon <shiningdracon@gmail.com>
Date: Sun, 8 Sep 2024 19:34:26 -0700
Subject: [PATCH 3/3] egl-wayland: Handle failure to acquire image in
wlEglSendDamageEvent
The image parameter of send_explicit_sync_points is assumed not to be
null, however this is a case the rest of the code handles. This causes
sporadic problems on KDE when running overnight as the image will not
be valid at some point, causing us to crash.
Fixes #143
---
src/wayland-eglsurface.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/wayland-eglsurface.c b/src/wayland-eglsurface.c
index 4e4dcff..ae6cafc 100644
--- a/src/wayland-eglsurface.c
+++ b/src/wayland-eglsurface.c
@@ -265,11 +265,13 @@ wlEglSendDamageEvent(WlEglSurface *surface,
}
image = pop_acquired_image(surface);
- if (image) {
- surface->ctx.currentBuffer = image->buffer;
- image->attached = EGL_TRUE;
+ if (!image) {
+ return EGL_FALSE;
}
+ surface->ctx.currentBuffer = image->buffer;
+ image->attached = EGL_TRUE;
+
/*
* Send our explicit sync acquire and release points. This needs to be done
* as part of the surface attach as it is a protocol error to specify these
--
2.43.0