summaryrefslogtreecommitdiff
path: root/exa/exa_classic.c
diff options
context:
space:
mode:
authorTiago Vignatti <tiago.vignatti@nokia.com>2010-04-16 17:50:43 +0300
committerTiago Vignatti <tiago.vignatti@nokia.com>2010-04-21 18:06:59 +0300
commit49835eec0c996ad95a01f0fe340336b6b60e51aa (patch)
treea61cd574f33ac38ef78cf6adcd43f9abae2430bb /exa/exa_classic.c
parent996c115deb558e8e9490ea773528b8e96650df53 (diff)
exa: check for NULL pointer before dereferences it
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Acked-by: Michel Dänzer <michel@daenzer.net> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
Diffstat (limited to 'exa/exa_classic.c')
-rw-r--r--exa/exa_classic.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/exa/exa_classic.c b/exa/exa_classic.c
index c31e2d4b3..e1ead6c0d 100644
--- a/exa/exa_classic.c
+++ b/exa/exa_classic.c
@@ -148,7 +148,7 @@ Bool
exaModifyPixmapHeader_classic(PixmapPtr pPixmap, int width, int height, int depth,
int bitsPerPixel, int devKind, pointer pPixData)
{
- ScreenPtr pScreen = pPixmap->drawable.pScreen;
+ ScreenPtr pScreen;
ExaScreenPrivPtr pExaScr;
ExaPixmapPrivPtr pExaPixmap;
Bool ret;
@@ -156,6 +156,7 @@ exaModifyPixmapHeader_classic(PixmapPtr pPixmap, int width, int height, int dept
if (!pPixmap)
return FALSE;
+ pScreen = pPixmap->drawable.pScreen;
pExaScr = ExaGetScreenPriv(pScreen);
pExaPixmap = ExaGetPixmapPriv(pPixmap);