[Commits] [wesnoth/wesnoth] c6f262: MP Create Game: fixed crash when switching to game...
GitHub
noreply at github.com
Sun Nov 6 00:16:39 UTC 2016
Branch: refs/heads/master
Home: https://github.com/wesnoth/wesnoth
Commit: c6f262a9fd46a04cfeba72d7c0dad9a0934e88c5
https://github.com/wesnoth/wesnoth/commit/c6f262a9fd46a04cfeba72d7c0dad9a0934e88c5
Author: Charles Dang <exodia339 at gmail.com>
Date: 2016-11-06 (Sun, 06 Nov 2016)
Changed paths:
M src/gui/dialogs/multiplayer/mp_create_game.cpp
Log Message:
-----------
MP Create Game: fixed crash when switching to game category with invalid games
This manifested itself when switching to User Maps when the only available map had invalid (campaign-specific)
tiles. Normally, the entry would be removed from the available game types if empty, but the check that does that
only checks for a presence of a game, not validity. This caused a crash in on_filter_change, most likely because
there were no games to apply a filter to.
For now, this fixes the crash. I'll have to add some functionality to prevent starting a game in this or other
situations (such as if the filters filter out all games), since one can still enter a game on that "invalid"
map, or the last selected game if a filter returns 0.
This also means that were one to select a category with a single invalid game, try to start a game, and re-enter
the dialog later, the screen would essentially be blank, as no info would be available to show. I'll have to fix
this post-1.13.6.
More information about the Commits
mailing list