fix stringshare usage in wizard language page (010)

lang is not stringshared, and if it were then add/ref should always
be called before del
This commit is contained in:
Mike Blumenkrantz 2016-03-16 13:01:09 -04:00
parent 160fb71af0
commit 604bf1ea4e
1 changed files with 2 additions and 4 deletions

View File

@ -246,8 +246,7 @@ wizard_page_hide(E_Wizard_Page *pg EINA_UNUSED)
{
// evas_object_del(pg->data);
/* special - language inits its stuff the moment it goes away */
eina_stringshare_del(e_config->language);
e_config->language = eina_stringshare_ref(lang);
eina_stringshare_replace(&e_config->language, lang);
/* TODO:
* This should be on lang select,
* so if next page needs xdg we can't press next */
@ -262,8 +261,7 @@ E_API int
wizard_page_apply(E_Wizard_Page *pg EINA_UNUSED)
{
// do this again as we want it to apply to the new profile
eina_stringshare_del(e_config->language);
e_config->language = eina_stringshare_ref(lang);
eina_stringshare_replace(&e_config->language, lang);
e_intl_language_set(e_config->language);
e_wizard_labels_update();
return 1;