From 8e1b4b8109ed2154a44ef6491cddc180cc8616b8 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 10 Oct 2014 10:33:16 +0100 Subject: coverity738920 Uninitialized scalar field Change-Id: Ic1571d24a8a696dc24b899d262b9e560d005ee88 --- vcl/generic/glyphs/gcach_ftyp.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'vcl/generic/glyphs') diff --git a/vcl/generic/glyphs/gcach_ftyp.cxx b/vcl/generic/glyphs/gcach_ftyp.cxx index fa93fc603738..4a8ddd014ded 100644 --- a/vcl/generic/glyphs/gcach_ftyp.cxx +++ b/vcl/generic/glyphs/gcach_ftyp.cxx @@ -489,8 +489,6 @@ ServerFont::ServerFont( const FontSelectPattern& rFSD, FtFontInfo* pFI ) static_cast(rFSD.mpFontEntry)->SetServerFont( this ); maFaceFT = pFI->GetFaceFT(); - if( !maFaceFT ) - return; if( rFSD.mnOrientation != 0 ) { @@ -508,6 +506,9 @@ ServerFont::ServerFont( const FontSelectPattern& rFSD, FtFontInfo* pFI ) if( (mnWidth < 0) || (mfStretch > +64.0) || (mfStretch < -64.0) ) return; + if( !maFaceFT ) + return; + FT_New_Size( maFaceFT, &maSizeFT ); FT_Activate_Size( maSizeFT ); FT_Error rc = FT_Set_Pixel_Sizes( maFaceFT, mnWidth, rFSD.mnHeight ); -- cgit