summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/sna/sna.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/sna/sna.h b/src/sna/sna.h
index 5b3569e2..6c4d1795 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