Ref Count Catch

With Permission from Jeff Faust.

         // AFX CODE BLOCK (bug-fix) <<
         // for events that are not GuaranteedOrdered we can get here w/o ever
         // incrementing ref-count on the event.
This commit is contained in:
Azaezel 2014-12-22 18:01:18 -06:00
parent 84430a46a8
commit dbf9275037

View file

@ -344,6 +344,8 @@ void NetConnection::eventReadPacket(BitStream *bstream)
if(unguaranteedPhase)
{
evt->process(this);
if (evt->getRefCount() == 0)
evt->incRef();
evt->decRef();
if(mErrorBuffer.isNotEmpty())
return;