fix Null pointer access

fix Null pointer access