e: be sure to set pointers to NULL after removing them from stringshare.
authorChidambar Zinnoury <illogict@online.fr>
Sun, 2 Oct 2011 13:16:15 +0000 (13:16 +0000)
committerChidambar Zinnoury <illogict@online.fr>
Sun, 2 Oct 2011 13:16:15 +0000 (13:16 +0000)
 This prevents some memory corruptions from happening when messing a lil' bit too much with languages.

SVN revision: 63747

src/modules/conf_intl/e_int_config_intl.c

index 6931d65..ad41eb0 100644 (file)
@@ -1126,6 +1126,8 @@ _ilist_language_cb_change(void *data, Evas_Object *obj __UNUSED__)
    e_widget_entry_text_set(cfdata->gui.locale_entry, cfdata->cur_lang);
    eina_stringshare_del(cfdata->cur_cs);
    eina_stringshare_del(cfdata->cur_mod);
+   cfdata->cur_cs = NULL;
+   cfdata->cur_mod = NULL;
 }
 
 static void
@@ -1147,6 +1149,8 @@ _ilist_region_cb_change(void *data, Evas_Object *obj __UNUSED__)
       e_widget_entry_text_set(cfdata->gui.locale_entry, "");
    eina_stringshare_del(cfdata->cur_cs);
    eina_stringshare_del(cfdata->cur_mod);
+   cfdata->cur_cs = NULL;
+   cfdata->cur_mod = NULL;
 }
 
 static void