Marcus Meissner : winex11.drv: Check NULL before calling (Coverity).

Alexandre Julliard julliard at winehq.org
Wed Dec 2 10:22:13 CST 2009


Module: wine
Branch: master
Commit: 8a06bd9e1c60ec2374ec5f33947fc06938fd4990
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=8a06bd9e1c60ec2374ec5f33947fc06938fd4990

Author: Marcus Meissner <marcus at jet.franken.de>
Date:   Tue Dec  1 23:47:34 2009 +0100

winex11.drv: Check NULL before calling (Coverity).

---

 dlls/winex11.drv/xfont.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/dlls/winex11.drv/xfont.c b/dlls/winex11.drv/xfont.c
index a45a3a3..aa3eb76 100644
--- a/dlls/winex11.drv/xfont.c
+++ b/dlls/winex11.drv/xfont.c
@@ -1674,7 +1674,6 @@ static void XFONT_LoadAliases( HKEY hkey )
     /* then user specified aliases */
     do
     {
-        BOOL bSubst;
 	char subsection[32];
         snprintf( subsection, sizeof(subsection), "%s%i", INIAliasSection, i++ );
 
@@ -1690,9 +1689,9 @@ static void XFONT_LoadAliases( HKEY hkey )
 
 	XFONT_InitialCapitals(buffer);
 	lpResource = XFONT_GetStringItem( buffer );
-	bSubst = (XFONT_GetStringItem( lpResource )) ? TRUE : FALSE;
 	if( lpResource && *lpResource )
 	{
+            BOOL bSubst = (XFONT_GetStringItem( lpResource )) ? TRUE : FALSE;
             if (LFD_Parse(lpResource, &lfd)) XFONT_LoadAlias(&lfd, buffer, bSubst);
 	}
 	else




More information about the wine-cvs mailing list