File tree Expand file tree Collapse file tree
libvisual-plugins/plugins/actor/gforce/unix/libmfl Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -51,7 +51,10 @@ mfl_font mfl_LoadRawFont(const char *fname) {
5151
5252 /* Open font file */
5353 ff = fopen (fname , "rb" );
54- if (ff == NULL ) goto lrf_open_fault ;
54+ if (ff == NULL ) {
55+ visual_log (VISUAL_LOG_WARNING , "Unable to open font file: %s" , fname );
56+ goto lrf_open_fault ;
57+ }
5558
5659 /* Get length of font file */
5760 if (fseek (ff , 0 , SEEK_END ) != 0 ) goto lrf_fault ;
@@ -70,6 +73,7 @@ mfl_font mfl_LoadRawFont(const char *fname) {
7073
7174 /* Read font data */
7275 if (fread (f -> data , 1 , l , ff ) != l ) {
76+ visual_log (VISUAL_LOG_WARNING , "Unable to fully read font file: %s" , fname );
7377 free (f -> data );
7478 free (f );
7579 f = NULL ;
@@ -84,7 +88,9 @@ mfl_font mfl_LoadRawFont(const char *fname) {
8488}
8589
8690void mfl_DestroyFont (mfl_font f ) {
87- visual_return_if_fail (f != NULL );
91+ if (f == NULL ) {
92+ return ;
93+ }
8894 free (f -> data );
8995 free (f );
9096}
You can’t perform that action at this time.
0 commit comments