more conversions to weak pointers

This commit is contained in:
Simon Jarrett 2018-06-21 23:32:21 +01:00
parent b08ab94319
commit e91df41c8e
21 changed files with 1201 additions and 747 deletions

View file

@ -1041,9 +1041,10 @@ void CClient::GenerateStarterGear(std::shared_ptr<CWeenieObject> weenieObject, A
std::shared_ptr<CContainerWeenie> sack = NULL;
for (auto pack : weenie->m_Packs)
{
if (pack->AsContainer())
std::shared_ptr<CWeenieObject> pPack = pack.lock();
if (pPack && pPack->AsContainer())
{
sack = pack->AsContainer();
sack = pPack->AsContainer();
break;
}
}