diff options
-rw-r--r-- | EGL/yagl_egl_calls.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/EGL/yagl_egl_calls.c b/EGL/yagl_egl_calls.c index ce71728..88606cd 100644 --- a/EGL/yagl_egl_calls.c +++ b/EGL/yagl_egl_calls.c @@ -2076,6 +2076,7 @@ YAGL_API EGLSyncKHR eglCreateSyncKHR(EGLDisplay dpy_, EGLenum type, const EGLint EGLSyncKHR ret = EGL_NO_SYNC_KHR; struct yagl_display *dpy = NULL; struct yagl_fence *fence = NULL; + struct yagl_context *ctx = NULL; YAGL_RETURN_IF_DEV_NOT_AVAILABLE(EGL_NO_SYNC_KHR); @@ -2098,6 +2099,12 @@ YAGL_API EGLSyncKHR eglCreateSyncKHR(EGLDisplay dpy_, EGLenum type, const EGLint goto out; } + ctx = yagl_get_context(); + if (!ctx) { + YAGL_SET_ERR(EGL_BAD_MATCH); + goto out; + } + fence = yagl_get_backend()->create_fence(dpy); if (!fence) { @@ -2227,6 +2234,11 @@ YAGL_API EGLBoolean eglGetSyncAttribKHR(EGLDisplay dpy_, EGLSyncKHR sync_, EGLin sync_, attribute); + if (!value) { + YAGL_SET_ERR(EGL_BAD_PARAMETER); + goto out; + } + if (!yagl_validate_display(dpy_, &dpy)) { goto out; } |