fix null pointer exception

MIUI-24836

Change-Id: Ib792febad9a4c730b8ffab0cf5cda645519e3f9f
Signed-off-by: mochangming <mochangming@xiaomi.com>