소스 검색

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.
Azaezel 10 년 전
부모
커밋
dbf9275037
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      Engine/source/sim/netEvent.cpp

+ 2 - 0
Engine/source/sim/netEvent.cpp

@@ -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;