diff --git a/sflphone-gtk/src/actions.c b/sflphone-gtk/src/actions.c index 3cbd51e025b21ddb416247b22bc3d085d5016a2a..67b0644b9beee7f6fcc77aa0ea51b93ccf7fd6fd 100644 --- a/sflphone-gtk/src/actions.c +++ b/sflphone-gtk/src/actions.c @@ -761,24 +761,27 @@ sflphone_place_call ( call_t * c ) sflphone_display_selected_codec (const gchar* codecName) { - call_t * selectedCall = calltab_get_selected_call(current_calls); + call_t * selectedCall; gchar* msg; account_t* acc; - if(selectedCall->accountID != NULL){ - acc = account_list_get_by_id(selectedCall->accountID); - if (!acc) { - msg = g_markup_printf_escaped (_("IP call - %s"), codecName); - } - else { - msg = g_markup_printf_escaped(_("%s account- %s %s") , - (gchar*)g_hash_table_lookup( acc->properties , ACCOUNT_TYPE), - (gchar*)g_hash_table_lookup( acc->properties , ACCOUNT_ALIAS), - codecName); + + selectedCall = calltab_get_selected_call(current_calls); + if (selectedCall) { + if(selectedCall->accountID != NULL){ + acc = account_list_get_by_id(selectedCall->accountID); + if (!acc) { + msg = g_markup_printf_escaped (_("IP call - %s"), codecName); + } + else { + msg = g_markup_printf_escaped(_("%s account- %s %s") , + (gchar*)g_hash_table_lookup( acc->properties , ACCOUNT_TYPE), + (gchar*)g_hash_table_lookup( acc->properties , ACCOUNT_ALIAS), + codecName); + } + statusbar_push_message( msg , __MSG_ACCOUNT_DEFAULT); + g_free(msg); } - statusbar_push_message( msg , __MSG_ACCOUNT_DEFAULT); - g_free(msg); } - } gchar*