stk: Fix issue in stk_alpha_id_set

Fixes the crash seen with the null alpha identifier.
Also removed the icon check since the decision of whether to inform the
user of the action is dependent entirely on whether the alpha identifier
is provided by the UICC.
This commit is contained in:
Jeevaka Badrappan 2011-01-26 12:15:11 -08:00 committed by Denis Kenzior
parent dc3019031d
commit 0be9e23a90
1 changed files with 6 additions and 1 deletions

View File

@ -479,7 +479,12 @@ static void stk_alpha_id_set(struct ofono_stk *stk,
{
char *alpha = dbus_apply_text_attributes(text, attr);
if (alpha || icon)
/*
* Currently, we are treating null data object(len = 0, no value part)
* and no alpha identifier cases equally. This may be changed once
* better idea is found out.
*/
if (alpha != NULL)
stk_agent_display_action_info(stk->current_agent, alpha, icon);
g_free(alpha);