On 03.03.2015 05:01, Tormod Volden wrote: > From: Tormod Volden <[email protected]> > > Thanks to Connor Behan for the suggestion. > > Signed-off-by: Tormod Volden <[email protected]> > --- > > Also not tested on hardware. > > Tormod > > src/mga_exa.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/src/mga_exa.c b/src/mga_exa.c > index 24a7328..cb17ad8 100644 > --- a/src/mga_exa.c > +++ b/src/mga_exa.c > @@ -727,6 +727,9 @@ static Bool > mgaDownloadFromScreen(PixmapPtr pSrc, int x, int y, int w, int h, > char *dst, int dst_pitch) > { > + if (!pSrc) > + return FALSE; > + > PMGA(pSrc); > > char *src = pMga->ExaDriver->memoryBase + exaGetPixmapOffset(pSrc); >
This isn't necessary. Only pScrPict->pDrawable and pMaskPict->pDrawable can be NULL in mgaCheckComposite. EXA never calls driver hooks with NULL PixmapPtrs. About patch 1, since mgaDownloadFromScreen doesn't do anything fancier than memcpy, you can just remove it altogether and leave pExa->DownloadFromScreen NULL. EXA then does basically the same thing mgaDownloadFromScreen does. -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
