Fix a bug which can cause the fatal error.

Signed-off-by: gnolizuh <huzilong_007@163.com>