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

[E-devel] font config dialog bug



In the font configuration dialog, set the title bar font to an empty
string, restart E and go to font properties and a segfault occurs.

Here's the bt:
#0  evas_stringshare_add (str=0x0) at evas_stringshare.c:24
#1  0x080e9cb8 in _create_data (cfd=0x0) at e_int_config_fonts.c:147
#2  0x080cc315 in _e_config_dialog_go (cfd=0x8145450, 
    type=E_CONFIG_DIALOG_CFDATA_TYPE_BASIC) at e_config_dialog.c:110
#3  0x080cc400 in e_config_dialog_new (con=0x0, title=0x0, icon=0x0, 
    icon_size=0, view=0x8392618, data=0x0) at e_config_dialog.c:67
#4  0x080e9bbd in e_int_config_fonts (con=0x0) at
e_int_config_fonts.c:115
#5  0x080de922 in _e_wid_cb_item_sel (data=0x81236e0, data2=0x83bbd78)
    at e_widget_ilist.c:320
#6  0xb7e7ffaa in evas_object_event_callback_call (obj=0x83bbd88, 
    type=EVAS_CALLBACK_MOUSE_UP, event_info=0xbf7fadcc) at
evas_callbacks.c:189
#7  0xb7e81f42 in evas_event_feed_mouse_up (e=0x825ff98, b=1, 
    flags=EVAS_BUTTON_NONE, timestamp=2844300682, data=0x0)
    at evas_events.c:313
#8  0xb7e3a17f in _ecore_evas_x_event_mouse_button_up (data=0x0,
type=13, 
    event=0x826e060) at ecore_evas_x.c:483
#9  0xb7e6664c in _ecore_event_call () at ecore_events.c:431
#10 0xb7e6c0be in _ecore_main_loop_iterate_internal (once_only=0)
    at ecore_main.c:639
#11 0xb7e6c2b7 in ecore_main_loop_begin () at ecore_main.c:79
#12 0x08062d23 in main (argc=1, argv=0xbf7fe8d4) at e_main.c:684

(The patch is a quick hack, just to show where the bug might be.)


/Regards
Tobias Glenstrup
--- e_int_config_fonts.c.orig	2006-04-17 22:02:08.000000000 +0200
+++ e_int_config_fonts.c	2006-04-17 22:31:46.000000000 +0200
@@ -144,16 +144,19 @@
 	     
 	     if (!strcmp(tc->class_name, efd->text_class))
 	       {
-		tc->font = evas_stringshare_add(efd->font);
-		tc->size = efd->size;
-		tc->enabled = 1;
+		  if (efd->font) 
+		    {
+		       tc->font = evas_stringshare_add(efd->font);
+		       tc->size = efd->size;
+		       tc->enabled = 1;
+		    }
 	       }
 	  }
 
 	if (!tc->enabled)
 	  {
 	     efd = e_font_default_get(tc->class_name); 
-	     if (efd)
+	     if (efd->font)
 	       {
 		  tc->font = evas_stringshare_add(efd->font);
 		  tc->size = efd->size;