[gtkhtml/gnome-3-2] Bug #626922 - Crash in html_text_prepare_attrs at htmltext.c
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkhtml/gnome-3-2] Bug #626922 - Crash in html_text_prepare_attrs at htmltext.c
- Date: Fri, 21 Oct 2011 11:57:25 +0000 (UTC)
commit 4fbfa41aa1ecede5e049552273af39b74905a9c9
Author: Milan Crha <mcrha redhat com>
Date: Fri Oct 21 13:57:00 2011 +0200
Bug #626922 - Crash in html_text_prepare_attrs at htmltext.c
gtkhtml/htmltext.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtkhtml/htmltext.c b/gtkhtml/htmltext.c
index c5482ba..aa1b577 100644
--- a/gtkhtml/htmltext.c
+++ b/gtkhtml/htmltext.c
@@ -1316,7 +1316,7 @@ html_text_prepare_attrs (HTMLText *text,
}
if (HTML_IS_PLAIN_PAINTER (painter)) {
- attr = pango_attr_family_new (painter->font_manager.fixed.face);
+ attr = pango_attr_family_new (painter->font_manager.fixed.face ? painter->font_manager.fixed.face : "Monospace");
attr->start_index = 0;
attr->end_index = text->text_bytes;
pango_attr_list_insert (attrs, attr);
@@ -3948,7 +3948,7 @@ calc_font_size_filter (PangoAttribute *attr,
* once family in style is used again, that code must be updated */
PangoAttrString *sa = (PangoAttrString *) attr;
g_free (sa->value);
- sa->value = g_strdup (e->painter->font_manager.fixed.face);
+ sa->value = g_strdup (e->painter->font_manager.fixed.face ? e->painter->font_manager.fixed.face : "Monospace");
}
return FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]