Selon Nacho Barrientos Arias <[EMAIL PROTECTED]>:
> (gdb) print style_ptr->font
> $2 = (GdkFont *) 0x7083d0
>
> > (gdb) next
> > (gdb) print style_ptr->font
> > <Is it NULL now?>
>
> Yes,
>
> (gdb) next
> 170 style_ptr = styles_list->edit_text_background;
> (gdb) print style_ptr->font
> $3 = (GdkFont *) 0x0
Great, thanks. Could you please try the attached patch? It tries to
avoid the problem you're facing.
Thomas
--- prefop.c- 2006-09-13 07:54:20.000000000 +0000
+++ prefop.c 2006-09-13 07:58:01.000000000 +0000
@@ -156,10 +156,12 @@
*/
#define DO_APPLY_ENTRY_FONT_NAME { \
if((font_name != NULL) && (style_ptr != NULL)) { \
- if(style_ptr->font != NULL) \
- gdk_font_unref(style_ptr->font); \
- style_ptr->font = gdk_font_load(font_name); \
-} }
+ GdkFont *new_font = gdk_font_load(font_name); \
+ if(new_font != NULL) { \
+ if(style_ptr->font != NULL) \
+ gdk_font_unref(style_ptr->font); \
+ style_ptr->font = new_font; \
+} } }
/* Font editable text */
font_name = (gchar *)PrefParmGetValueP(