summaryrefslogtreecommitdiff
path: root/shared
diff options
context:
space:
mode:
authorMarius Vlad <marius.vlad@collabora.com>2022-07-12 14:23:57 +0300
committerMarius Vlad <marius.vlad@collabora.com>2022-11-10 11:07:12 +0200
commitfb57ce17ef3f95027ef7eb807daa37a6ad951d10 (patch)
treecb5f17390e1d1e1053d7e544e37171c6c2996fbe /shared
parentcfe35b591f94014eef6cc22f00ee5a6472dc3522 (diff)
downloadweston-fb57ce17ef3f95027ef7eb807daa37a6ad951d10.tar.gz
shared/cairo-util: Release any fontmap laying around
This is particularly useful when using the weston-editor which seems to cause an issue with cairo_debug_reset_static_data(), as that still seems to find out there are references laying around, causing a crash when exiting: ../../../../src/cairo-hash.c:217: _cairo_hash_table_destroy: Assertion `hash_table->live_entries == 0' failed Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Diffstat (limited to 'shared')
-rw-r--r--shared/cairo-util.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/shared/cairo-util.c b/shared/cairo-util.c
index 48b39da1..b210e93f 100644
--- a/shared/cairo-util.c
+++ b/shared/cairo-util.c
@@ -691,6 +691,10 @@ theme_get_location(struct theme *t, int x, int y,
void
cleanup_after_cairo(void)
{
+ /* some clients, particular weston-editor, still creates indirectly a
+ * new font map; this makes sure we untie that up and avoid an assert
+ * from cairo */
+ pango_cairo_font_map_set_default(NULL);
cairo_debug_reset_static_data();
#ifdef HAVE_PANGO
FcFini();