From ff805e1140dd5fd05e7d17d9b4a50c177cb6bec0 Mon Sep 17 00:00:00 2001 From: vvaltman Date: Mon, 8 Sep 2014 23:18:51 +0400 Subject: [PATCH] Fixed set of real_name of uninitialezed user --- structures.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/structures.c b/structures.c index 96fa7af..178d97c 100644 --- a/structures.c +++ b/structures.c @@ -266,7 +266,9 @@ void tglf_fetch_user_full (struct tgl_user *U) { char *s1 = fetch_str (l1); int l2 = prefetch_strlen (); char *s2 = fetch_str (l2); - bl_do_user_set_real_name (U, s1, l1, s2, l2); + if (U && (U->flags & FLAG_CREATED)) { + bl_do_user_set_real_name (U, s1, l1, s2, l2); + } } void tglf_fetch_encrypted_chat (struct tgl_secret_chat *U) {