egl_dri2: Fix eglGetProcAddress.
authorChia-I Wu <olv@lunarg.com>
Wed, 12 Jan 2011 10:06:47 +0000 (18:06 +0800)
committerChia-I Wu <olv@lunarg.com>
Wed, 12 Jan 2011 10:10:15 +0000 (18:10 +0800)
The driver struct is zeroed after dri2_load.  Oops.

src/egl/drivers/dri2/egl_dri2.c

index 8967969c924a9733f9959f1cd7008a2912143f98..458d18f4da5aa2d17a1d91fd491611580812aa3f 100644 (file)
@@ -2382,10 +2382,11 @@ _EGL_MAIN(const char *args)
    if (!dri2_drv)
       return NULL;
 
+   memset(dri2_drv, 0, sizeof *dri2_drv);
+
    if (!dri2_load(&dri2_drv->base))
       return NULL;
 
-   memset(dri2_drv, 0, sizeof *dri2_drv);
    _eglInitDriverFallbacks(&dri2_drv->base);
    dri2_drv->base.API.Initialize = dri2_initialize;
    dri2_drv->base.API.Terminate = dri2_terminate;