diff options
| author | Eduard Braun <eduard.braun2@gmx.de> | 2017-09-23 18:02:45 +0000 |
|---|---|---|
| committer | Eduard Braun <eduard.braun2@gmx.de> | 2017-09-23 19:23:26 +0000 |
| commit | 6b8c070aa2a30a15f3d3187fc35af0cfe662d354 (patch) | |
| tree | ad9cc2cf1a4a397540fdbaea63a7e3a72c9ad4a3 /src/libnrtype | |
| parent | Do not crash if no fonts are available (diff) | |
| download | inkscape-6b8c070aa2a30a15f3d3187fc35af0cfe662d354.tar.gz inkscape-6b8c070aa2a30a15f3d3187fc35af0cfe662d354.zip | |
cleanup: do not overwrite/free original font description
(likely unproblematic but better be safe than sorry...)
Diffstat (limited to 'src/libnrtype')
| -rw-r--r-- | src/libnrtype/FontFactory.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libnrtype/FontFactory.cpp b/src/libnrtype/FontFactory.cpp index 40e5d4ba1..3b7b5b9b4 100644 --- a/src/libnrtype/FontFactory.cpp +++ b/src/libnrtype/FontFactory.cpp @@ -685,10 +685,10 @@ font_instance *font_factory::Face(PangoFontDescription *descr, bool canFail) // no match if ( canFail ) { PANGO_DEBUG("falling back to 'sans-serif'\n"); - descr = pango_font_description_new(); - pango_font_description_set_family(descr,"sans-serif"); - res = Face(descr,false); - pango_font_description_free(descr); + PangoFontDescription *new_descr = pango_font_description_new(); + pango_font_description_set_family(new_descr, "sans-serif"); + res = Face(new_descr, false); + pango_font_description_free(new_descr); } else { g_critical("Could not load any face for font '%s'.", pango_font_description_to_string(descr)); } |
