diff --git a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DTreeBuffer.cpp b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DTreeBuffer.cpp index 6527aeff55d..e88aff34f32 100644 --- a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DTreeBuffer.cpp +++ b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DTreeBuffer.cpp @@ -1140,6 +1140,11 @@ void W3DTreeBuffer::freeTreeBuffers(void) //============================================================================= void W3DTreeBuffer::unitMoved(Object *unit) { + // Null pointer check to prevent crash when invalid Object pointer is passed + if (unit == NULL) { + return; + } + if (unit->isKindOf(KINDOF_IMMOBILE)) { // This is the initial positioning of the object, and we don't care. jba. [6/5/2003] return; @@ -2045,3 +2050,7 @@ void W3DTreeBuffer::loadPostProcess( void ) + + + +