Browse Source

Do not draw text from file if file not found

jp9000 11 years ago
parent
commit
0fca88dde9
1 changed files with 3 additions and 1 deletions
  1. 3 1
      plugins/text-freetype2/text-freetype2.c

+ 3 - 1
plugins/text-freetype2/text-freetype2.c

@@ -372,9 +372,11 @@ skip_font_load:;
 			bfree(srcdata->text_file);
 			bfree(srcdata->text_file);
 			srcdata->text_file = NULL;
 			srcdata->text_file = NULL;
 		}
 		}
-		else
+		else {
 			blog(LOG_WARNING,
 			blog(LOG_WARNING,
 				"FT2-text: Failed to open %s for reading", tmp);
 				"FT2-text: Failed to open %s for reading", tmp);
+			goto error;
+		}
 		srcdata->text_file = bstrdup(tmp);
 		srcdata->text_file = bstrdup(tmp);
 
 
 		if (chat_log_mode)
 		if (chat_log_mode)