Added a check to the "superVU" recompiler to stop Dirge of Cerberus from crashing: a function was trying to use an uninitialized pointer.

This check could be avoided by properly initializing the values but I don't know where would that be.
This commit is contained in:
gigaherz
2007-12-29 02:51:17 +00:00
parent 434e2c7064
commit 64d227a153

View File

@@ -943,7 +943,14 @@ static VuBaseBlock* SuperVUBuildBlocks(VuBaseBlock* parent, u32 startpc, const V
{
// check if block already exists
VuBlockHeader* pbh = &recVUBlocks[s_vu][startpc/8];
if( pbh->pblock != NULL ) {
if(pbh->pblock == (VuBaseBlock*)0xfdfdfdfd)
{
pbh->pblock=NULL;
pbh->delay=0;
}
if ( pbh->pblock != NULL ) {
VuBaseBlock* pblock = pbh->pblock;
list<VuInstruction>::iterator itinst;