Find the variable that is the nullpointer and then backtrack to find out why it is not properly initialized. Then decide how you would want to initialize it with a value properly.