summaryrefslogtreecommitdiff
path: root/opengl
diff options
context:
space:
mode:
author Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2024-09-26 01:18:02 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2024-09-26 01:18:02 +0000
commit8dd89273e03ce7c906889d26b852ea2493447756 (patch)
tree8e6e6a1e4c64e0c5d3aede8df4ce096622340093 /opengl
parent12f83cff40f7b75c110a50e1dae40a87c7f893de (diff)
parentab851c755da1652212b99c851571fd0bf2930a6f (diff)
Merge "Fix crash in presentation time implementation" into main
Diffstat (limited to 'opengl')
-rw-r--r--opengl/libs/EGL/egl_platform_entries.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/opengl/libs/EGL/egl_platform_entries.cpp b/opengl/libs/EGL/egl_platform_entries.cpp
index ca4b129f43..0bfefd6706 100644
--- a/opengl/libs/EGL/egl_platform_entries.cpp
+++ b/opengl/libs/EGL/egl_platform_entries.cpp
@@ -2111,6 +2111,10 @@ EGLBoolean eglPresentationTimeANDROIDImpl(EGLDisplay dpy, EGLSurface surface,
}
egl_surface_t const* const s = get_surface(surface);
+ if (!s->getNativeWindow()) {
+ setError(EGL_BAD_SURFACE, EGL_FALSE);
+ return EGL_FALSE;
+ }
native_window_set_buffers_timestamp(s->getNativeWindow(), time);
return EGL_TRUE;