Fix crash for Deck Menu

Old save with stats should work 👍
This commit is contained in:
Anthony Calosa
2016-06-01 18:03:04 +08:00
parent 57c7796424
commit 5cd5f4b38e
2 changed files with 2 additions and 2 deletions

View File

@@ -125,7 +125,7 @@ void DeckMenu::RenderDeckManaColors()
if (deckManaColors.size() == 6)
{
// due to space constraints don't display icons for colorless mana.
for( int colorIdx = Constants::MTG_COLOR_GREEN; colorIdx < Constants::MTG_COLOR_LAND; ++colorIdx )
for( int colorIdx = Constants::MTG_COLOR_GREEN; colorIdx < Constants::MTG_COLOR_WASTE; ++colorIdx )
{
if ( (deckManaColors.at(colorIdx) == '1') != 0)
{

View File

@@ -394,7 +394,7 @@ void StatsWrapper::updateStats(string filename, MTGAllCards *collection)
void StatsWrapper::updateStats(DeckDataWrapper *myDeck)
{
if(!this) return;
if(!this) return;
if (!this->needUpdate || !myDeck) return;
this->needUpdate = false;