修复 NullPointerException 错误