From b20cb045881bcd1fefab69c910d705948ff62c14 Mon Sep 17 00:00:00 2001 From: Mart Raudsepp <leio@gentoo.org> Date: Thu, 25 Aug 2005 12:46:57 +0000 Subject: [PATCH] [wxGTK2] Check if a family wasn't found for the description in GetFamily() git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35310 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/unix/fontutil.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/unix/fontutil.cpp b/src/unix/fontutil.cpp index bcabccd4b0..13f155a6d2 100644 --- a/src/unix/fontutil.cpp +++ b/src/unix/fontutil.cpp @@ -149,7 +149,7 @@ wxFontFamily wxNativeFontInfo::GetFamily() const else { PangoFontFamily **families; - PangoFontFamily *family; + PangoFontFamily *family = NULL; int n_families; pango_context_list_families( #ifdef __WXGTK20__ @@ -175,7 +175,7 @@ wxFontFamily wxNativeFontInfo::GetFamily() const //BCI: Cache the wxFontFamily inside the class. Validate cache with //BCI: g_ascii_strcasecmp(pango_font_description_get_family(description), pango_font_family_get_name(family)) == 0 - if (pango_font_family_is_monospace( family )) + if (family != NULL && pango_font_family_is_monospace( family )) ret = wxFONTFAMILY_TELETYPE; // is deemed a monospace font by pango } #endif // pango_font_family_is_monospace -- 2.47.2