]> granicus.if.org Git - libass/commitdiff
Make sure font path is valid
authorGrigori Goronzy <greg@chown.ath.cx>
Fri, 19 Aug 2011 03:23:26 +0000 (05:23 +0200)
committerGrigori Goronzy <greg@chown.ath.cx>
Fri, 10 Jul 2015 08:42:40 +0000 (10:42 +0200)
We do not support memory-based fonts yet, so a path is mandatory.

libass/ass_fontselect.c

index aea3c23097b1bdcd1cc115764ba851049dcc5487..efd4a39cbe181a261deb5ddc4a158397631d458d 100644 (file)
@@ -179,7 +179,9 @@ ass_font_provider_add_font(ASS_FontProvider *provider,
     ASS_FontSelector *selector = provider->parent;
     ASS_FontInfo *info;
 
-    // TODO: sanity checks. do we have a path or valid get_face function?
+    // XXX: there's no support for memory fonts yet
+    if (!path)
+        return 0;
 
     weight = meta->weight;
     slant  = meta->slant;