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:
@@ -260,7 +260,11 @@ void StatsWrapper::updateStats(string filename, MTGAllCards *collection)
|
|||||||
|
|
||||||
void StatsWrapper::updateStats(DeckDataWrapper *myDeck)
|
void StatsWrapper::updateStats(DeckDataWrapper *myDeck)
|
||||||
{
|
{
|
||||||
if (!this->needUpdate || !myDeck) return;
|
if (!myDeck)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!this->needUpdate) return;
|
||||||
this->needUpdate = false;
|
this->needUpdate = false;
|
||||||
this->cardCount = myDeck->getCount(WSrcDeck::UNFILTERED_COPIES);
|
this->cardCount = myDeck->getCount(WSrcDeck::UNFILTERED_COPIES);
|
||||||
this->countLands = myDeck->getCount(Constants::MTG_COLOR_LAND);
|
this->countLands = myDeck->getCount(Constants::MTG_COLOR_LAND);
|
||||||
|
|||||||
Reference in New Issue
Block a user