tags 369445 +patch thanks, control if you could just... hmm... get this patch to the maintainer... mmhhh that would be grreeeat....
On Thu, Aug 24, 2006 at 11:04:26PM +0200, Paul van Tilburg wrote: > On Sat, Aug 19, 2006 at 10:24:00PM -0300, Damián Viano wrote: > > Can you still reproduce this? > > Yes, I start gmoo, it installs some default config. I edit .gmoo/gmoorc > and set the 'normal font' value to some nonsense, then it crashes on > start/world open. I have been tracing it a bit and somewhere a font is > looked up, this results in a NULL (if the font can't be found via > GtkFont) and this NULL is probably used later on. I haven't found where > 'later on' is yet, but any help is welcome. Perfect, with your instructions I could reproduce and fix this bug. I didn't need to dig so much on who was using the NULL pointer returned by gdk_font_load, since the right fix imho is to avoid overriding the right font in case of not finding the new font appropriate. So this would just use the default font in the gtk theme if the setted font can't be loaded. Hope to help, -- Damián Viano(Des) ¯ ¯ - _ _ - ¯ ¯ GPG: 0x6EB95A6F Debian ¯-_GNU_-¯ Linux Web: http://damianv.com.ar/ ¯-¯
diff -Nura gmoo-0.5.6.des/src/settings.c gmoo-0.5.6/src/settings.c --- gmoo-0.5.6.des/src/settings.c 2006-08-24 23:20:16.000000000 +0000 +++ gmoo-0.5.6/src/settings.c 2006-08-24 23:23:43.000000000 +0000 @@ -254,7 +254,6 @@ gushort r[N_COLORS]; gushort g[N_COLORS]; gushort b[N_COLORS]; - GdkFont* tmp_font; int i; settings_get_rgbs(r, g, b); @@ -267,9 +266,7 @@ copy_color(&input_style->text[GTK_STATE_NORMAL], &colors[FG_COLOR]); copy_color(&input_style->base[GTK_STATE_NORMAL], &colors[BG_COLOR]); gdk_font_unref(input_style->font); - tmp_font = gdk_font_load(settings->fontname); - if (tmp_font) - input_style->font = tmp_font; + input_style->font = gdk_font_load(settings->fontname); } void init_colors_and_styles() {