sna: Assert that the ScrnInfo and ScreenPtr relationship is correct

References: https://bugs.freedesktop.org/show_bug.cgi?id=56608
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2013-03-01 12:13:47 +00:00
parent 8d97c192a3
commit d4164de5cc
1 changed files with 6 additions and 0 deletions

View File

@ -230,6 +230,9 @@ static Bool sna_create_screen_resources(ScreenPtr screen)
DBG(("%s(%dx%d@%d)\n", __FUNCTION__,
screen->width, screen->height, screen->rootDepth));
assert(sna->scrn == xf86ScreenToScrn(screen));
assert(sna->scrn->pScreen == screen);
free(screen->devPrivate);
screen->devPrivate = NULL;
@ -916,6 +919,9 @@ sna_screen_init(SCREEN_INIT_ARGS_DECL)
DBG(("%s\n", __FUNCTION__));
assert(sna->scrn == scrn);
assert(scrn->pScreen == NULL); /* set afterwards */
if (!sna_register_all_privates())
return FALSE;