Debugging a null pointer dereference