Don't access pairCache->getOverlappingPairArrayPtr() if there are 0 pairs.
Thanks to knox31085 Fixes Issue 579.
This commit is contained in:
@@ -205,7 +205,8 @@ void SpuGatheringCollisionDispatcher::dispatchAllCollisionPairs(btOverlappingPai
|
||||
|
||||
//send one big batch
|
||||
int numTotalPairs = pairCache->getNumOverlappingPairs();
|
||||
|
||||
if (numTotalPairs)
|
||||
{
|
||||
btBroadphasePair* pairPtr = pairCache->getOverlappingPairArrayPtr();
|
||||
int i;
|
||||
{
|
||||
@@ -225,7 +226,6 @@ void SpuGatheringCollisionDispatcher::dispatchAllCollisionPairs(btOverlappingPai
|
||||
i = endIndex;
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
BT_PROFILE("PPU fallback");
|
||||
//handle PPU fallback pairs
|
||||
@@ -260,6 +260,7 @@ void SpuGatheringCollisionDispatcher::dispatchAllCollisionPairs(btOverlappingPai
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
BT_PROFILE("flush2");
|
||||
//make sure all SPU work is done
|
||||
|
||||
Reference in New Issue
Block a user