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
|
//send one big batch
|
||||||
int numTotalPairs = pairCache->getNumOverlappingPairs();
|
int numTotalPairs = pairCache->getNumOverlappingPairs();
|
||||||
|
if (numTotalPairs)
|
||||||
|
{
|
||||||
btBroadphasePair* pairPtr = pairCache->getOverlappingPairArrayPtr();
|
btBroadphasePair* pairPtr = pairCache->getOverlappingPairArrayPtr();
|
||||||
int i;
|
int i;
|
||||||
{
|
{
|
||||||
@@ -225,7 +226,6 @@ void SpuGatheringCollisionDispatcher::dispatchAllCollisionPairs(btOverlappingPai
|
|||||||
i = endIndex;
|
i = endIndex;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
BT_PROFILE("PPU fallback");
|
BT_PROFILE("PPU fallback");
|
||||||
//handle PPU fallback pairs
|
//handle PPU fallback pairs
|
||||||
@@ -260,6 +260,7 @@ void SpuGatheringCollisionDispatcher::dispatchAllCollisionPairs(btOverlappingPai
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
{
|
{
|
||||||
BT_PROFILE("flush2");
|
BT_PROFILE("flush2");
|
||||||
//make sure all SPU work is done
|
//make sure all SPU work is done
|
||||||
|
|||||||
Reference in New Issue
Block a user