Add m_pStencil is nil test, add warning log.