fix null pointer exception

MIUI-24836

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