forked from enlightenment/edi
credits_check/scm_ui: Fix bugs that crash.
I can't believe these are in here! Apologies! :)
This commit is contained in:
parent
ea6b0ab193
commit
d2d9f7bd05
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue