diff options
Diffstat (limited to 'src/mesa/drivers/dri/unichrome/via_screen.c')
-rw-r--r-- | src/mesa/drivers/dri/unichrome/via_screen.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/unichrome/via_screen.c b/src/mesa/drivers/dri/unichrome/via_screen.c index 924818c124..50342f3ff5 100644 --- a/src/mesa/drivers/dri/unichrome/via_screen.c +++ b/src/mesa/drivers/dri/unichrome/via_screen.c @@ -101,6 +101,10 @@ viaInitDriver(__DRIscreenPrivate *sPriv) (PFNGLXSCRENABLEEXTENSIONPROC) (*dri_interface->getProcAddress("glxEnableExtension")); void * const psc = sPriv->psc->screenConfigs; + if (sPriv->devPrivSize != sizeof(VIADRIRec)) { + fprintf(stderr,"\nERROR! sizeof(VIADRIRec) does not match passed size from device driver\n"); + return GL_FALSE; + } /* Allocate the private area */ viaScreen = (viaScreenPrivate *) CALLOC(sizeof(viaScreenPrivate)); |