[evolution-patches] [gtkhtml] 72525 Crash when adding signature
- From: Radek Doulík <rodo novell com>
- To: Patches <evolution-patches ximian com>
- Cc: Rodney Dawes <dobey novell com>, Rodrigo Moya <rodrigo novell com>
- Subject: [evolution-patches] [gtkhtml] 72525 Crash when adding signature
- Date: Mon, 21 Feb 2005 17:25:59 +0100
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/ChangeLog,v
retrieving revision 1.2093
diff -u -p -r1.2093 ChangeLog
--- ChangeLog 18 Feb 2005 13:11:44 -0000 1.2093
+++ ChangeLog 21 Feb 2005 16:09:19 -0000
@@ -1,3 +1,13 @@
+2005-02-21 Radek Doulik <rodo novell com>
+
+ * htmltextslave.c (html_text_slave_get_glyph_item_at_offset): add
+ painter parameter to avoid passing NULL to get glyph items in case
+ we have painter pointer ready
+ (html_text_slave_get_glyph_items): recalc glyph items only if
+ painter is non NULL
+
+ Fixes #72525
+
2005-02-15 Radek Doulik <rodo novell com>
* htmltextslave.c (draw_text): scale down run_width to engine
Index: htmltextslave.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/htmltextslave.c,v
retrieving revision 1.186
diff -u -p -r1.186 htmltextslave.c
--- htmltextslave.c 18 Feb 2005 13:11:44 -0000 1.186
+++ htmltextslave.c 21 Feb 2005 16:09:37 -0000
@@ -653,7 +653,7 @@ get_glyph_items_in_range (HTMLTextSlave
GSList *
html_text_slave_get_glyph_items (HTMLTextSlave *slave, HTMLPainter *painter)
{
- if (!slave->glyph_items || (HTML_OBJECT (slave)->change & HTML_CHANGE_RECALC_PI)) {
+ if (painter && (!slave->glyph_items || (HTML_OBJECT (slave)->change & HTML_CHANGE_RECALC_PI))) {
clear_glyph_items (slave);
HTML_OBJECT (slave)->change &= ~HTML_CHANGE_RECALC_PI;
@@ -1167,7 +1167,7 @@ html_text_slave_is_index_in_glyph (HTMLT
}
static HTMLTextSlaveGlyphItem *
-html_text_slave_get_glyph_item_at_offset (HTMLTextSlave *slave, int offset, HTMLTextSlaveGlyphItem **prev, HTMLTextSlaveGlyphItem **next, int *start_width, int *index_out)
+html_text_slave_get_glyph_item_at_offset (HTMLTextSlave *slave, HTMLPainter *painter, int offset, HTMLTextSlaveGlyphItem **prev, HTMLTextSlaveGlyphItem **next, int *start_width, int *index_out)
{
HTMLTextSlaveGlyphItem *rv = NULL;
HTMLTextSlaveGlyphItem *prev_gi, *next_gi;
@@ -1182,7 +1182,7 @@ html_text_slave_get_glyph_item_at_offset
if (start_width)
*start_width = 0;
- cur = html_text_slave_get_glyph_items (slave, NULL);
+ cur = html_text_slave_get_glyph_items (slave, painter);
if (cur) {
for (prev_gi = NULL; cur; cur = cur->next) {
HTMLTextSlaveGlyphItem *gi = (HTMLTextSlaveGlyphItem *) cur->data;
@@ -1259,7 +1259,7 @@ html_text_slave_cursor_right_one (HTMLTe
{
HTMLTextSlaveGlyphItem *prev, *next;
int index;
- HTMLTextSlaveGlyphItem *gi = html_text_slave_get_glyph_item_at_offset (slave, cursor->offset - slave->posStart, &prev, &next, NULL, &index);
+ HTMLTextSlaveGlyphItem *gi = html_text_slave_get_glyph_item_at_offset (slave, NULL, cursor->offset - slave->posStart, &prev, &next, NULL, &index);
if (!gi)
return FALSE;
@@ -1319,7 +1319,7 @@ html_text_slave_cursor_left_one (HTMLTex
{
HTMLTextSlaveGlyphItem *prev, *next;
int index;
- HTMLTextSlaveGlyphItem *gi = html_text_slave_get_glyph_item_at_offset (slave, cursor->offset - slave->posStart, &prev, &next, NULL, &index);
+ HTMLTextSlaveGlyphItem *gi = html_text_slave_get_glyph_item_at_offset (slave, NULL, cursor->offset - slave->posStart, &prev, &next, NULL, &index);
/* printf ("gi: %p item num chars: %d\n", gi, gi ? gi->glyph_item.item->num_chars : -1); */
@@ -1448,7 +1448,7 @@ html_text_slave_get_cursor_base (HTMLTex
html_object_calc_abs_position (HTML_OBJECT (slave), x, y);
- gi = html_text_slave_get_glyph_item_at_offset (slave, (int) offset, NULL, NULL, &start_width, &index);
+ gi = html_text_slave_get_glyph_item_at_offset (slave, painter, (int) offset, NULL, NULL, &start_width, &index);
/* printf ("gi: %p index: %d start_width: %d item indexes %d %d\n", */
/* gi, index, start_width, gi ? gi->glyph_item.item->offset : -1, */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]