Re: prefs

Colin Leroy <[email protected]> Fri, 20 Dec 2002 16:54:20 +0100
Newsgroups gmane.network.everybuddy.devel
Message-ID <[email protected]>
On Fri, 20 Dec 2002 13:52:37 +0100 Colin Leroy <[email protected]> wrote:

> They really segfault a lot. Just open it a few times, it shouldn't be
> more than 3/4 times before segfault.
> I tried to look for the reason but the backtraces are useless. Seems the
> memory is nicely messed up :-(
> 
> cheers,

This was my fault

Can someone with write access apply this ?
--- prefs.c.old	Fri Dec 20 16:52:24 2002
+++ prefs.c	Fri Dec 20 16:52:58 2002
@@ -777,9 +777,8 @@
      fprintf(fp,"do_tabbed_chat=%d\n", do_tabbed_chat);
      fprintf(fp,"do_tabbed_chat_orient=%d\n", do_tabbed_chat_orient);
      ptr = gtk_entry_get_text(GTK_ENTRY(font_size_entry));
-     if (!ptr) ptr = strdup("2");
-     font_size = atoi(ptr);
-     free(ptr);
+     if (!ptr) font_size=2;
+     else font_size = atoi(ptr);
      fprintf(fp,"FontSize=%d\n", font_size);
      iSetLocalPref("FontSize",font_size);
 	 fprintf(fp,"do_ignore_fore=%d\n", do_ignore_fore);

-- 
Colin
http://www.colino.net/