fix crash when change status to offline

Signed-off-by: xiehuc <xiehuc@gmail.com>