[maemo-commits] [maemo-commits] r17091 - in projects/haf/trunk/gtk+: . gtk

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Mon Jan 12 12:47:37 EET 2009
Author: csaavedra
Date: 2009-01-12 12:47:36 +0200 (Mon, 12 Jan 2009)
New Revision: 17091

Modified:
   projects/haf/trunk/gtk+/ChangeLog
   projects/haf/trunk/gtk+/gtk/gtktextlayout.c
   projects/haf/trunk/gtk+/gtk/gtktextview.c
Log:
2009-01-12  Claudio Saavedra  <csaavedra at igalia.com>

	Merged from trunk:

	Bug 567468 ?\226?\128?\147 no check for trailing != NULL in
	gtk_text_layout_get_iter_at_position()

	* gtk/gtktextlayout.c: (gtk_text_layout_get_iter_at_position):
	Check for trailing to be non-NULL.
	* gtk/gtktextview.c: (gtk_text_view_get_iter_at_position): document
	that trailing may be NULL.



Modified: projects/haf/trunk/gtk+/ChangeLog
===================================================================
--- projects/haf/trunk/gtk+/ChangeLog	2009-01-12 10:44:05 UTC (rev 17090)
+++ projects/haf/trunk/gtk+/ChangeLog	2009-01-12 10:47:36 UTC (rev 17091)
@@ -1,3 +1,15 @@
+2009-01-12  Claudio Saavedra  <csaavedra at igalia.com>
+
+	Merged from trunk:
+
+	Bug 567468 – no check for trailing != NULL in
+	gtk_text_layout_get_iter_at_position()
+
+	* gtk/gtktextlayout.c: (gtk_text_layout_get_iter_at_position):
+	Check for trailing to be non-NULL.
+	* gtk/gtktextview.c: (gtk_text_view_get_iter_at_position): document
+	that trailing may be NULL.
+
 2009-01-09  Christian Dywan  <christian at imendio.com>
 
 	Fixes: NB#95401 - crash at IA__gdk_window_new

Modified: projects/haf/trunk/gtk+/gtk/gtktextlayout.c
===================================================================
--- projects/haf/trunk/gtk+/gtk/gtktextlayout.c	2009-01-12 10:44:05 UTC (rev 17090)
+++ projects/haf/trunk/gtk+/gtk/gtktextlayout.c	2009-01-12 10:47:36 UTC (rev 17091)
@@ -2657,7 +2657,8 @@
   if (y > display->height - display->top_margin - display->bottom_margin)
     {
       byte_index = _gtk_text_line_byte_count (line);
-      *trailing = 0;
+      if (trailing)
+        *trailing = 0;
     }
   else
     {

Modified: projects/haf/trunk/gtk+/gtk/gtktextview.c
===================================================================
--- projects/haf/trunk/gtk+/gtk/gtktextview.c	2009-01-12 10:44:05 UTC (rev 17090)
+++ projects/haf/trunk/gtk+/gtk/gtktextview.c	2009-01-12 10:47:36 UTC (rev 17091)
@@ -1492,7 +1492,7 @@
  * gtk_text_view_get_iter_at_position:
  * @text_view: a #GtkTextView
  * @iter: a #GtkTextIter
- * @trailing: location to store an integer indicating where
+ * @trailing: if non-%NULL, location to store an integer indicating where
  *    in the grapheme the user clicked. It will either be
  *    zero, or the number of characters in the grapheme. 
  *    0 represents the trailing edge of the grapheme.


More information about the maemo-commits mailing list