Also fixes a memleak in that case, bug #1313.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27875
b3059339-0415-0410-9bf9-
f77b7e298cf2
if (!fc) {
mp_msg(MSGT_ASS, MSGL_WARN,
MSGTR_LIBASS_FontconfigDisabledDefaultFontWillBeUsed);
- priv->config = NULL;
- priv->path_default = strdup(path);
- priv->index_default = 0;
- return priv;
+ goto exit;
}
rc = FcInit();
priv->config = FcConfigGetCurrent();
if (!priv->config) {
mp_msg(MSGT_ASS, MSGL_FATAL, MSGTR_LIBASS_FcInitLoadConfigAndFontsFailed);
- return 0;
+ goto exit;
}
for (i = 0; i < library->num_fontdata; ++i)
}
priv->family_default = family ? strdup(family) : 0;
+exit:
priv->path_default = path ? strdup(path) : 0;
priv->index_default = 0;