reverting change made in r2701
The conditions on which to "updateStats" during the rebuilding of filters needed to be updated. stw is NULL when rebuilding the filters due to a "UNLOCK CARDS" action. Thus the call to stw->updateStats throws a NPE. stw is not null only when a deck has been selected to edit. Otherwise, it makes no sense to actually update the stats of a non-selected deck.
This commit is contained in:
@@ -101,7 +101,10 @@ void GameStateDeckViewer::rebuildFilters()
|
||||
filterMenu->setSrc(source);
|
||||
if (displayed_deck != myDeck) source->swapSrc();
|
||||
filterMenu->Finish(true);
|
||||
stw->updateStats( myDeck );;
|
||||
|
||||
// no stats need updating if there isn't a deck to update
|
||||
if (stw && myDeck)
|
||||
stw->updateStats( myDeck );;
|
||||
}
|
||||
void GameStateDeckViewer::updateFilters()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user