fix  null pointer bug

fix  null pointer bug