diff options
Diffstat (limited to 'src/egl/main/eglsurface.c')
-rw-r--r-- | src/egl/main/eglsurface.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/egl/main/eglsurface.c b/src/egl/main/eglsurface.c index c5ea2245b3d..1dca3e06876 100644 --- a/src/egl/main/eglsurface.c +++ b/src/egl/main/eglsurface.c @@ -314,7 +314,9 @@ _eglInitSurface(_EGLSurface *surf, _EGLDisplay *dpy, EGLint type, return EGL_FALSE; } - _eglInitResource(&surf->Resource, sizeof(*surf), dpy); + + memset(surf, 0, sizeof(_EGLSurface)); + _eglInitResource(&surf->Resource, sizeof(_EGLResource), dpy); surf->Type = type; surf->Config = conf; |