Outstanding patches, #57613



The bug is: If an iter points to the last position in a buffer
gtk_text_iter_forward_cursor_position() crashes.

Is the proposed patch ok to commit ?
Matthias

--- gtk+-clean/gtk/gtktextiter.c	Thu Jun 14 16:41:43 2001
+++ gtk+-hacked/gtk/gtktextiter.c	Tue Jul 24 00:48:30 2001
@@ -2746,11 +2746,14 @@

   g_return_val_if_fail (iter != NULL, FALSE);

+  if (gtk_text_iter_is_end (iter))

+    return FALSE;
+  }
   attrs = _gtk_text_buffer_get_line_log_attrs (gtk_text_iter_get_buffer
(iter),
                                                iter, &char_len);

   offset = gtk_text_iter_get_line_offset (iter);
-
+
   g_assert (char_len > 0);

   if (offset < char_len)







[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]