add a comment

This commit is contained in:
gfgtdf 2018-07-01 00:38:10 +02:00 committed by GitHub
parent a82c9258f1
commit 459fd5f8e9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -456,6 +456,12 @@ void mp_join_game::generate_side_list(window& window)
//
const auto handler = [this, side_num](bool& handled, bool& halt) {
show_flg_select(side_num);
// note: this function is called from a std::function object stored in the widget
// and show_flg_select which internally calls
// show_dialog -> pump -> ... -> network_handler -> ... -> generate_side_list
// might destroy that std::function object while it is executed, this means that
// using the captured variables 'this' and 'side_num' after this will result in
// unexpected behaviour or crashes.
handled = halt = true;
};