fix null pointer dereference

Signed-off-by: Ruoyu <liangry@ucweb.com>