summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2018-03-26 22:23:49 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2018-03-26 22:41:30 +0100
commit6c1e70ca4234a5ab23fcdb3735fc55ac7939c52c (patch)
tree0a024fdeb0ee2ce810a8d5ae5e67d1cec3ae8e95 /src
parentaa36399cca1250d878a4608528a535faeb0e931a (diff)
sna: Fixup early assert of xf86ScrnToScreen
During early init, xf86ScrnToScreen() may return NULL, so handle that possibility inside the assert. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src')
-rw-r--r--src/sna/sna.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sna/sna.h b/src/sna/sna.h
index c9097d3d..3ccc74c8 100644
--- a/src/sna/sna.h
+++ b/src/sna/sna.h
@@ -509,7 +509,7 @@ to_sna_from_screen(ScreenPtr screen)
pure static inline ScreenPtr to_screen_from_sna(struct sna *sna)
{
ScreenPtr screen = xf86ScrnToScreen(sna->scrn);
- assert(sna == to_sna_from_screen(screen));
+ assert(!screen || sna == to_sna_from_screen(screen));
return screen;
}