message: Acquire cs_vNodes before changing refrence counts
diff: @@ -891,8 +891,15 @@ static std::list<CNode*> vNodesDisconnected;
  class CNodeRef {
  public:
  - CNodeRef(CNode *pnode) : _pnode(pnode) {_pnode->AddRef();}
  - ~CNodeRef() {_pnode->Release();}
  + CNodeRef(CNode *pnode) : _pnode(pnode) {
  + LOCK(cs_vNodes);
  + _pnode->AddRef();
  + }
  +
  + ~CNodeRef() {
  + LOCK(cs_vNodes);
  + _pnode->Release();
  + }
  CNode& operator *() const {return *_pnode;};
  CNode* operator ->() const {return _pnode;};
  @@ -900,6 +907,8 @@ public:
  CNodeRef& operator =(const CNodeRef& other)
  {
  if (this != &other) {
  + LOCK(cs_vNodes);
  +
  _pnode->Release();
  _pnode = other._pnode;
  _pnode->AddRef();
  @@ -910,6 +919,7 @@ public:
  CNodeRef(const CNodeRef& other):
  _pnode(other._pnode)
  {
  + LOCK(cs_vNodes);
  _pnode->AddRef();
  }
  private:
  