The DRI driver itself might not have version 3 of the
DRI2 flush extension, in which case this would've
pointed to out of bounds memory...
struct dri2_drawable *pdp = (struct dri2_drawable *) pdraw;
#if __DRI2_FLUSH_VERSION >= 3
- if (pdraw && psc->f)
+ if (pdraw && psc->f && psc->f->base.version >= 3 && psc->f->invalidate)
psc->f->invalidate(pdp->driDrawable);
#endif
}
psc = (struct dri2_screen *) base->psc;
#if __DRI2_FLUSH_VERSION >= 3
- if (!pdp->invalidateAvailable && psc->f)
+ if (!pdp->invalidateAvailable && psc->f &&
+ psc->f->base.version >= 3 && psc->f->invalidate)
psc->f->invalidate(pdraw->driDrawable);
#endif