fixed a crash that would occur when you select a player deck then cancel without selecting an ai deck....this also reviles a strange bug, instead of going back to main screen it put you into deck editor.
This commit is contained in:
@@ -279,11 +279,11 @@ void GameStateDuel::End()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
JRenderer::GetInstance()->EnableVSync(false);
|
JRenderer::GetInstance()->EnableVSync(false);
|
||||||
if (!premadeDeck && mPlayers.size() && mPlayers[0] && mPlayers[1])
|
if (!premadeDeck && mPlayers.size() > 1 && mPlayers[0] && mPlayers[1])
|
||||||
{ // save the stats for the game
|
{ // save the stats for the game
|
||||||
mPlayers[0]->End();
|
mPlayers[0]->End();
|
||||||
}
|
}
|
||||||
else if (mPlayers.size() && !mPlayers[1] && mPlayers[0] )
|
else if (mPlayers.size() && mPlayers.size() == 1 && mPlayers[0] )
|
||||||
// clean up player object
|
// clean up player object
|
||||||
SAFE_DELETE( mPlayers[0] );
|
SAFE_DELETE( mPlayers[0] );
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user