Fix crash in presentation time implementation

Summary: Something in Audio Trip triggers this bug when running the display at 90Hz.

Setting the display panel to 72Hz makes Audio Trip work, but setting it to 90Hz causes it to crash with an error in native_window_set_buffers_timestamp.

The error occurs because the surface's window value is null. A simple fix is to check for this and error out, which solves the problem and allows the app to work despite the error.

The true root cause of the issue is unknown.

Test: Successful Build on master branch

Bug: b/369698627

Change-Id: Ib5ccc8bde07e44cb6ebac5b58d370a23b57ff020
Signed-off-by: Abdelrahman Daim <adaim@meta.com>
diff --git a/opengl/libs/EGL/egl_platform_entries.cpp b/opengl/libs/EGL/egl_platform_entries.cpp
index a6af713..8c9518a 100644
--- a/opengl/libs/EGL/egl_platform_entries.cpp
+++ b/opengl/libs/EGL/egl_platform_entries.cpp
@@ -2111,6 +2111,10 @@
     }
 
     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;