1881: fix the null pointer error