summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStafford Mitchell Horne <shorne@gmail.com>2006-04-18 18:36:11 +0000
committerStafford Mitchell Horne <shorne@gmail.com>2006-04-18 18:36:11 +0000
commitefb7cead4752f015d85a830e5e4963b02274e6ca (patch)
tree2bd02a9a59e6492fa3bfe6c92bfa2aa235e7c7a4
parent748c9d3690500491a916466395b8c85f88c65395 (diff)
Fix segv in font configuration (thanks tobias)
* When the font is originally configured it is set to "". after a restart the font will be read from eet as NULL. I need to check for this. SVN revision: 22203
-rw-r--r--src/bin/e_int_config_fonts.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/bin/e_int_config_fonts.c b/src/bin/e_int_config_fonts.c
index 5c94a17b1..43a96443d 100644
--- a/src/bin/e_int_config_fonts.c
+++ b/src/bin/e_int_config_fonts.c
@@ -144,16 +144,20 @@ _fill_data(E_Config_Dialog_Data *cfdata)
144 144
145 if (!strcmp(tc->class_name, efd->text_class)) 145 if (!strcmp(tc->class_name, efd->text_class))
146 { 146 {
147 tc->font = evas_stringshare_add(efd->font); 147 if (efd->font)
148 tc->size = efd->size; 148 tc->font = evas_stringshare_add(efd->font);
149 tc->enabled = 1; 149 else
150 tc->font = evas_stringshare_add("");
151
152 tc->size = efd->size;
153 tc->enabled = 1;
150 } 154 }
151 } 155 }
152 156
153 if (!tc->enabled) 157 if (!tc->enabled)
154 { 158 {
155 efd = e_font_default_get(tc->class_name); 159 efd = e_font_default_get(tc->class_name);
156 if (efd) 160 if (efd && efd->font)
157 { 161 {
158 tc->font = evas_stringshare_add(efd->font); 162 tc->font = evas_stringshare_add(efd->font);
159 tc->size = efd->size; 163 tc->size = efd->size;