credits_check/scm_ui: Fix bugs that crash.

I can't believe these are in here! Apologies! :)
This commit is contained in:
Alastair Poole 2018-05-14 00:25:34 +01:00 committed by Andy Williams
parent ea6b0ab193
commit d2d9f7bd05
2 changed files with 6 additions and 6 deletions

View File

@ -595,12 +595,12 @@ _edi_project_credentials_check(void)
eng = edi_scm_engine_get();
if ((!_edi_project_config->user_fullname || strlen(_edi_project_config->user_fullname) == 0) &&
eng && !eng->remote_name_get())
if ((!_edi_project_config->user_fullname || !_edi_project_config->user_fullname[0]) &&
(!eng || !eng->remote_name_get()))
return EINA_FALSE;
if ((!_edi_project_config->user_email || strlen(_edi_project_config->user_email) == 0) &&
eng && !eng->remote_email_get())
if ((!_edi_project_config->user_email || !_edi_project_config->user_email[0]) &&
(!eng || !eng->remote_email_get()))
return EINA_FALSE;
return EINA_TRUE;

View File

@ -651,7 +651,7 @@ edi_scm_ui_add(Evas_Object *parent)
remote_name = engine->remote_name_get();
remote_email = engine->remote_email_get();
if (remote_name[0] && remote_email[0])
if (remote_name && remote_name[0] && remote_email && remote_email[0])
avatar = elm_photo_add(parent);
else
avatar = elm_icon_add(parent);
@ -678,7 +678,7 @@ edi_scm_ui_add(Evas_Object *parent)
string = eina_strbuf_new();
if (!remote_name[0] && !remote_email[0])
if ((!remote_name || !remote_name[0]) && (!remote_email || !remote_email[0]))
{
eina_strbuf_append(string, _("Unable to obtain user information."));
elm_icon_standard_set(avatar, DEFAULT_USER_ICON);