Fix crash in gd_add_friend_to_dict

Change-Id: I21e00104237ababe7d0150f1861ccfe0cf03a981