fix potential uninitialized object pointer.