From 471f350c99b2e7c5a9045eef5ebff65cd2ddb7c5 Mon Sep 17 00:00:00 2001 From: Tiago Vignatti Date: Mon, 19 Apr 2010 20:34:30 +0300 Subject: [PATCH] exa: don't need to check for NULL pointer if we already assumed it has a value MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit the alternative would be to check ps in the beginning of the function. Signed-off-by: Tiago Vignatti Acked-by: Michel Dänzer --- exa/exa.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/exa/exa.c b/exa/exa.c index 590d9a500..b2bd1c565 100644 --- a/exa/exa.c +++ b/exa/exa.c @@ -779,14 +779,12 @@ exaCloseScreen(int i, ScreenPtr pScreen) unwrap(pExaScr, pScreen, BitmapToRegion); unwrap(pExaScr, pScreen, CreateScreenResources); #ifdef RENDER - if (ps) { - unwrap(pExaScr, ps, Composite); - if (pExaScr->SavedGlyphs) - unwrap(pExaScr, ps, Glyphs); - unwrap(pExaScr, ps, Trapezoids); - unwrap(pExaScr, ps, Triangles); - unwrap(pExaScr, ps, AddTraps); - } + unwrap(pExaScr, ps, Composite); + if (pExaScr->SavedGlyphs) + unwrap(pExaScr, ps, Glyphs); + unwrap(pExaScr, ps, Trapezoids); + unwrap(pExaScr, ps, Triangles); + unwrap(pExaScr, ps, AddTraps); #endif xfree (pExaScr);