diff options
author | Owen Taylor <otaylor@redhat.com> | 2002-07-25 15:44:54 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2002-07-25 15:44:54 +0000 |
commit | 731fc63b9af306a189ee60e3541c11b8d19420ab (patch) | |
tree | 8380f9d4f5852de54f795f43a7922e63107aaeb4 /pango/pangoft2-fontmap.c | |
parent | d71d34c3f79a4ea19394b7897810e4130bf8a685 (diff) | |
download | pango-731fc63b9af306a189ee60e3541c11b8d19420ab.tar.gz |
pango/pangoft2-fontmap.c (pango_ft2_shutdown_display) Handle checking for
Thu Jul 25 11:42:17 2002 Owen Taylor <otaylor@redhat.com>
* pango/pangoft2-fontmap.c (pango_ft2_shutdown_display)
* pango/pangowin32-fontmap.c (pango_win32_shutdown_display):
Handle checking for fontmap == NULL and setting
it to NULL after unrefing properly. (#87915,
Sven Neumann)
Diffstat (limited to 'pango/pangoft2-fontmap.c')
-rw-r--r-- | pango/pangoft2-fontmap.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/pango/pangoft2-fontmap.c b/pango/pangoft2-fontmap.c index 0e29b31d..47132f01 100644 --- a/pango/pangoft2-fontmap.c +++ b/pango/pangoft2-fontmap.c @@ -426,11 +426,14 @@ pango_ft2_get_context (double dpi_x, double dpi_y) void pango_ft2_shutdown_display (void) { - pango_ft2_font_map_cache_clear (pango_ft2_global_fontmap); - - g_object_unref (G_OBJECT (pango_ft2_global_fontmap)); - - pango_ft2_global_fontmap = NULL; + if (pango_ft2_global_fontmap) + { + pango_ft2_font_map_cache_clear (pango_ft2_global_fontmap); + + g_object_unref (G_OBJECT (pango_ft2_global_fontmap)); + + pango_ft2_global_fontmap = NULL; + } } |