diff --git a/src/virglrenderer.c b/src/virglrenderer.c index 7347004..32f91f1 100644 --- a/src/virglrenderer.c +++ b/src/virglrenderer.c @@ -393,6 +393,9 @@ int virgl_renderer_init(void *cookie, int flags, struct virgl_renderer_callbacks int virgl_renderer_get_fd_for_texture(uint32_t tex_id, int *fd) { #ifdef HAVE_EPOXY_EGL_H + if (!egl) + return -1; + return virgl_egl_get_fd_for_texture(egl, tex_id, fd); #else return -1; @@ -402,6 +405,9 @@ int virgl_renderer_get_fd_for_texture(uint32_t tex_id, int *fd) int virgl_renderer_get_fd_for_texture2(uint32_t tex_id, int *fd, int *stride, int *offset) { #ifdef HAVE_EPOXY_EGL_H + if (!egl) + return -1; + return virgl_egl_get_fd_for_texture2(egl, tex_id, fd, stride, offset); #else return -1;