[vlc-commits] commit: skins2: kill a warning at compil (Erwan Tulou )
git at videolan.org
git at videolan.org
Sat Jul 31 18:06:17 CEST 2010
vlc | branch: master | Erwan Tulou <erwan10 at videolan.org> | Sat Jul 31 08:43:05 2010 +0200| [78b09e7be88397c1baf2d70b307f8bd15ca1bf43] | committer: Erwan Tulou
skins2: kill a warning at compil
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=78b09e7be88397c1baf2d70b307f8bd15ca1bf43
---
modules/gui/skins2/src/ft2_font.cpp | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/modules/gui/skins2/src/ft2_font.cpp b/modules/gui/skins2/src/ft2_font.cpp
index 1fad1e0..60d21cb 100644
--- a/modules/gui/skins2/src/ft2_font.cpp
+++ b/modules/gui/skins2/src/ft2_font.cpp
@@ -90,10 +90,14 @@ bool FT2Font::init()
return false;
}
- fread( m_buffer, size, 1, file );
+ if( fread( m_buffer, size, 1, file ) != 1 )
+ {
+ msg_Err( getIntf(), "unexpected result for read" );
+ fclose( file );
+ return false;
+ }
fclose( file );
-
err = FT_New_Memory_Face( m_lib, (const FT_Byte*)m_buffer, size, 0,
&m_face );
if ( err == FT_Err_Unknown_File_Format )
More information about the vlc-commits
mailing list