diff options
-rw-r--r-- | src/glx/dri3_glx.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/glx/dri3_glx.c b/src/glx/dri3_glx.c index 4472a0bed26..f7bcba32f3e 100644 --- a/src/glx/dri3_glx.c +++ b/src/glx/dri3_glx.c @@ -81,6 +81,8 @@ static struct dri3_drawable * loader_drawable_to_dri3_drawable(struct loader_dri3_drawable *draw) { size_t offset = offsetof(struct dri3_drawable, loader_drawable); + if (!draw) + return NULL; return (struct dri3_drawable *)(((void*) draw) - offset); } |