summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/r128/r128_screen.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri/r128/r128_screen.c')
-rw-r--r--src/mesa/drivers/dri/r128/r128_screen.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/r128/r128_screen.c b/src/mesa/drivers/dri/r128/r128_screen.c
index 52b9b7bcbc..c6c598cc3b 100644
--- a/src/mesa/drivers/dri/r128/r128_screen.c
+++ b/src/mesa/drivers/dri/r128/r128_screen.c
@@ -102,6 +102,10 @@ r128CreateScreen( __DRIscreenPrivate *sPriv )
(PFNGLXSCRENABLEEXTENSIONPROC) (*dri_interface->getProcAddress("glxEnableExtension"));
void * const psc = sPriv->psc->screenConfigs;
+ if (sPriv->devPrivSize != sizeof(R128DRIRec)) {
+ fprintf(stderr,"\nERROR! sizeof(R128DRIRec) does not match passed size from device driver\n");
+ return GL_FALSE;
+ }
/* Allocate the private area */
r128Screen = (r128ScreenPtr) CALLOC( sizeof(*r128Screen) );