diff options
-rw-r--r-- | src/sna/sna_dri2.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/sna/sna_dri2.c b/src/sna/sna_dri2.c index 8f8baefb..bd5e26d7 100644 --- a/src/sna/sna_dri2.c +++ b/src/sna/sna_dri2.c @@ -234,7 +234,11 @@ dri2_chain(DrawablePtr d) assert(priv != NULL); return priv->chain; } -inline static DRI2BufferPtr dri2_window_get_front(WindowPtr win) { return dri2_window(win)->front; } +inline static DRI2BufferPtr dri2_window_get_front(WindowPtr win) +{ + struct dri2_window *priv = dri2_window(win); + return priv ? priv->front : NULL; +} #else inline static void *dri2_window_get_front(WindowPtr win) { return NULL; } #endif |