Re: Fix for #63426 - GtkTextView core dumps on deletion



Hans Breuer <hans breuer org> writes: 
> --- from-cvs/gtk+/gtk/gtktextiter.c	Sat Oct 27 02:18:26 2001
> +++ my-gtk/gtk+/gtk/gtktextiter.c	Sun Nov 04 17:34:24 2001
> @@ -3802,8 +3802,14 @@
>  
>    current_offset = gtk_text_iter_get_line_offset (iter);
>    new_offset = find_paragraph_delimiter_for_line (iter);
> -  
> -  if (current_offset < new_offset)
> +
> +  if (0 == new_offset) 
> +    {
> +      while (!gtk_text_iter_ends_line (iter))
> +        gtk_text_iter_forward_char (iter);
> +      return FALSE;
> +    }
> +  else if (current_offset < new_offset)
>      {
>        /* Move to end of this line. */
>        gtk_text_iter_set_line_offset (iter, new_offset);
> 

I don't understand this change; if new_offset == 0 and current_offset
>= 0, then we should be moving to the end of the next line, because
current_offset is already at or beyond the end of the current line.
That's how the function docs read to me anyhow.

Also, this change should definitely not cause a segfault to appear or
disappear; if this affects a segfault, then the segfault bug still
exists and hasn't been fixed. If you can reproduce the segfault, can
you add a backtrace to the bug report?

Havoc 



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