seperated an if( statement that was causing a crash in deck editor when you used the "unlock cards" cheat. this->needsUpdate is actually a Null Pointer at the time its checked, so having it checked in the same if ( would instantly cause the game to crash.

Issue: 536
This commit is contained in:
omegablast2002@yahoo.com
2010-11-29 00:36:38 +00:00
parent 83daafb3bf
commit 6e6ca0394b

View File

@@ -260,7 +260,11 @@ void StatsWrapper::updateStats(string filename, MTGAllCards *collection)
void StatsWrapper::updateStats(DeckDataWrapper *myDeck)
{
if (!this->needUpdate || !myDeck) return;
if (!myDeck)
{
return;
}
if (!this->needUpdate) return;
this->needUpdate = false;
this->cardCount = myDeck->getCount(WSrcDeck::UNFILTERED_COPIES);
this->countLands = myDeck->getCount(Constants::MTG_COLOR_LAND);