added random avatar fetching for game modes in which you don't fight a specific deck...
fixed a crash from random deck game modes where it was trying to check against a selected deck...but there is no selected deck in random. (side effect of this is that i can not bypass this, the stat still need to be run through without causing choas so i set it to deckname "" and id 0...we *might* need to find a different id...though it didn't seem to effect deck 0 as the name does not match)
This commit is contained in:
@@ -185,8 +185,8 @@ StatsWrapper * DeckManager::getExtendedDeckStats( DeckMetaData *selectedDeck, MT
|
||||
{
|
||||
StatsWrapper* stats = NULL;
|
||||
|
||||
string deckName = selectedDeck->getFilename();
|
||||
int deckId = selectedDeck->getDeckId();
|
||||
string deckName = selectedDeck?selectedDeck->getFilename():"";
|
||||
int deckId = selectedDeck?selectedDeck->getDeckId():0;
|
||||
|
||||
map<string, StatsWrapper*>* statsMap = isAI ? &aiDeckStatsMap : &playerDeckStatsMap;
|
||||
if ( statsMap->find(deckName) == statsMap->end())
|
||||
|
||||
Reference in New Issue
Block a user