Hello,

You can find a correction for this issue in mail attachment.

To apply, you can do this (in src/ dir.) :
patch < text_editor.c.patch


Quick analysis :

Depending on current user locale definition, the function "anjuta_encoding_get_from_charset()" may fail returning NULL. In this case, we should not append this (AnjutaEncoding *) NULL reference to "encodings" list.


Regards,
Yannick

*** text_editor.c~	Wed Apr  6 11:05:45 2005
--- text_editor.c	Sun Nov 12 15:30:05 2006
***************
*** 874,881 ****
  		if (locale_charset != NULL)
  		{
  			locale_encoding = anjuta_encoding_get_from_charset (locale_charset);
! 			encodings = g_list_prepend (encodings,
! 						(gpointer) locale_encoding);
  #ifdef DEBUG
  			g_message ("Current charset = %s", locale_charset);
  			/* g_message ("Current encoding = %s", locale_encoding); */
--- 874,888 ----
  		if (locale_charset != NULL)
  		{
  			locale_encoding = anjuta_encoding_get_from_charset (locale_charset);
! /* patch #358495: anjuta: Segfault when opening a file */
! //			encodings = g_list_prepend (encodings,
! //						(gpointer) locale_encoding);
! 			if (locale_encoding != NULL)
! 			{
! 			  encodings = g_list_prepend (encodings,
! 						      (gpointer) locale_encoding);
! 			}
! /* end patch #358495 */
  #ifdef DEBUG
  			g_message ("Current charset = %s", locale_charset);
  			/* g_message ("Current encoding = %s", locale_encoding); */

Reply via email to