fix null pointer exception

MIUI-24836

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