Browse Source

Merge pull request #297 from Hoikas/crash-fix

Fix Clone Race Condition
Branan Purvine-Riley 12 years ago
parent
commit
777197c8c7
  1. 6
      Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgrLoad.cpp

6
Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgrLoad.cpp

@ -105,6 +105,12 @@ plKey plNetClientMgr::ILoadClone(plLoadCloneMsg *pCloneMsg)
if(pCloneMsg->GetIsLoading()) if(pCloneMsg->GetIsLoading())
{ {
if (!cloneKey)
{
DebugMsg("ILoadClone: got a null clone key... either a loading race or someone is being naughty.");
return nullptr;
}
if (cloneKey->ObjectIsLoaded()) if (cloneKey->ObjectIsLoaded())
{ {
DebugMsg("ILoadClone: object %s is already loaded, ignoring", cloneKey->GetUoid().StringIze().c_str()); DebugMsg("ILoadClone: object %s is already loaded, ignoring", cloneKey->GetUoid().StringIze().c_str());

Loading…
Cancel
Save