 +    fileURL = CFBundleCopyResourceURL(CFBundleGetMainBundle(), CFSTR("OpenSans-Regular.ttf"),
 +                                      NULL,
 +                                      NULL);
++    if (!fileURL)
++        return VLC_EGENERIC;
++
 +    CFStringRef urlString = CFURLCopyFileSystemPath(fileURL, kCFURLPOSIXPathStyle);
 +    CFRelease(fileURL);
 +

From 4927e1c1755d5e37fb36bc3d377f3f55a668e5b9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
Date: Wed, 29 May 2013 13:25:54 +0200
Subject: [PATCH 4/9] libass: fix text rendering on iOS by providing a font
 lookup mechanism for the font shipped with Aspen

---
 modules/codec/libass.c | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/modules/codec/libass.c b/modules/codec/libass.c
index 067ef6b..256ab21 100644
--- a/modules/codec/libass.c
+++ b/modules/codec/libass.c
@@ -29,6 +29,13 @@

 #include <string.h>
 #include <limits.h>
 #include <assert.h>
@@ -213,6 +220,37 @@ static int Create( vlc_object_t *p_this )
 #if defined( __ANDROID__ )
     const char *psz_font = "/system/fonts/DroidSans-Bold.ttf";
     const char *psz_family = "Droid Sans Bold";
