[wesnoth-commits] [wesnoth/wesnoth] 7e3530: fix crash in mp lobby

gfgtdf noreply at github.com
Sat Dec 19 05:40:30 UTC 2020


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 7e353095c1e9c09f40bda852d0d3497c0a3bb444
      https://github.com/wesnoth/wesnoth/commit/7e353095c1e9c09f40bda852d0d3497c0a3bb444
  Author: gfgtdf <daniel.gfgtdf at gmail.com>
  Date:   2020-12-19 (Sat, 19 Dec 2020)

  Changed paths:
    M src/gui/widgets/generator.cpp

  Log Message:
  -----------
  fix crash in mp lobby

Fixes #4792

Previously that line would call generator::set_item_shown which inherits that class since set_item_shown is virtual. This doesn't work, in particular  since generator::set_item_shown wouldn't do anything if the to-be-deleted selected item is already hidden. (which for some reason happens quite often in the mp lobby window).

This resulted in generator::delete_item deleting a selecting item,  so selected_item_count_ would become wrong.





More information about the Commits mailing list