fix bugs.

menu null pointer exception.

Signed-off-by: achaly <achaly@163.com>