// Close the last contour
drawing_close_shape(drawing);
- ass_msg(drawing->library, MSGL_V,
- "Parsed drawing with %d points and %d contours", ol->n_points,
- ol->n_contours);
+ if (drawing->library)
+ ass_msg(drawing->library, MSGL_V,
+ "Parsed drawing with %d points and %d contours", ol->n_points,
+ ol->n_contours);
if (raw_mode)
return;
drawing->fontconfig_priv = fontconfig_priv;
drawing->font = font;
drawing->ftlibrary = lib;
- drawing->library = font->library;
+ if (font)
+ drawing->library = font->library;
drawing->scale_x = 1.;
drawing->scale_y = 1.;
if (priv) {
#ifdef CONFIG_FONTCONFIG
- FcConfigDestroy(priv->config);
+ if (priv->config)
+ FcConfigDestroy(priv->config);
#endif
free(priv->path_default);
free(priv->family_default);