Browse Source

Add null pointer check for text file

Apparently there was no check for a null pointer file name.
jp9000 11 years ago
parent
commit
8d76f940c6
1 changed files with 1 additions and 1 deletions
  1. 1 1
      plugins/text-freetype2/text-freetype2.c

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

@@ -205,7 +205,7 @@ static void ft2_video_tick(void *data, float seconds)
 {
 	struct ft2_source *srcdata = data;
 	if (srcdata == NULL) return;
-	if (!srcdata->from_file) return;
+	if (!srcdata->from_file || !srcdata->text_file) return;
 
 	if (os_gettime_ns() - srcdata->last_checked >= 1000000000) {
 		time_t t = get_modified_timestamp(srcdata->text_file);