Fix segv in font configuration (thanks tobias)
authorStafford Mitchell Horne <shorne@gmail.com>
Tue, 18 Apr 2006 18:36:11 +0000 (18:36 +0000)
committerStafford Mitchell Horne <shorne@gmail.com>
Tue, 18 Apr 2006 18:36:11 +0000 (18:36 +0000)
 * 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

src/bin/e_int_config_fonts.c

index 5c94a17..43a9644 100644 (file)
@@ -144,16 +144,20 @@ _fill_data(E_Config_Dialog_Data *cfdata)
             
             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);
+                 else
+                   tc->font = evas_stringshare_add("");
+
+                 tc->size = efd->size;
+                 tc->enabled = 1;
               }
          }
 
        if (!tc->enabled)
          {
             efd = e_font_default_get(tc->class_name); 
-            if (efd)
+            if (efd && efd->font)
               {
                  tc->font = evas_stringshare_add(efd->font);
                  tc->size = efd->size;