12-12-2013, 03:08 AM
Any idea why
According to VS it crashes because of
bool cRoot::StopWorld(AString a_WorldName, AString a_MoveToWorld)
{
if (a_WorldName == a_MoveToWorld || a_WorldName == m_pDefaultWorld->GetName())
{
return false;
}
if (m_WorldsByName[a_WorldName] == NULL)
{
return false;
}
class cCallback : public cPlayerListCallback
{
public:
const char * m_NewWorld;
cCallback(const char * a_NewWorld) : m_NewWorld(a_NewWorld) {}
virtual bool Item(cPlayer * a_Player) override
{
a_Player->MoveToWorld(m_NewWorld);
return false;
}
} a_Callback(a_MoveToWorld.c_str());
m_WorldsByName[a_WorldName]->ForEachPlayer(a_Callback);
m_WorldsByName[a_WorldName]->Stop();
return true;
}
makes the server crash?According to VS it crashes because of
AString IncomingData;
{
cCSLock Lock(m_CSIncomingData);
std::swap(IncomingData, m_IncomingData); // <--: This is the next statement to execute when this thread returns from the current function.
}

