xf86-video-intel: src/sna/sna.h

Chris Wilson ickle at kemper.freedesktop.org
Sun Jul 26 11:09:10 PDT 2015


 src/sna/sna.h |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit d11dc75fb5a95ba410fedd86d9e1dd50260af979
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sun Jul 26 19:07:45 2015 +0100

    sna: Only check non-NULL Pixmaps
    
    check_pixmap() can be called very early in the Window setup proceeding,
    before a pixmap is even assigned to a Window. There we expect the Window
    to be NULL, so be more careful in our check_pixmap.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91467#c16
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/sna.h b/src/sna/sna.h
index 5b3569e..6c4d179 100644
--- a/src/sna/sna.h
+++ b/src/sna/sna.h
@@ -184,8 +184,10 @@ static inline WindowPtr get_root_window(ScreenPtr screen)
 #if !NDEBUG
 static PixmapPtr check_pixmap(PixmapPtr pixmap)
 {
-	assert(pixmap->refcnt >= 1);
-	assert(pixmap->devKind != 0xdeadbeef);
+	if (pixmap != NULL) {
+		assert(pixmap->refcnt >= 1);
+		assert(pixmap->devKind != 0xdeadbeef);
+	}
 	return pixmap;
 }
 #else


More information about the xorg-commit mailing list