come on people, if it can return null then you can't just blindly throw it into strcmp and watch it segv.

SVN revision: 55032
This commit is contained in:
Mike Blumenkrantz 2010-11-27 07:32:30 +00:00
parent 99e8296fc2
commit 1164a8ab20
1 changed files with 9 additions and 1 deletions

View File

@ -718,11 +718,19 @@ _profile_use(void *data,
{
Evas_Object *li;
const char *selection;
const char *profile;
li = data;
selection = elm_list_item_data_get(elm_list_selected_item_get(li));
profile = elm_profile_current_get();
if (!strcmp(elm_profile_current_get(), selection))
if (!profile)
{
fprintf(stderr, "No profile currently set!");
return;
}
if (!strcmp(profile, selection))
return;
elm_config_save(); /* dump config into old profile's data dir */