[Commits] [wesnoth/wesnoth] 4d0fbc: attempt to fix UB in tree_view and unit drawer.

GitHub noreply at github.com
Tue Sep 20 22:39:22 UTC 2016


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 4d0fbc1d4e5246066e5f4fbb02a011a1f91ca8a2
      https://github.com/wesnoth/wesnoth/commit/4d0fbc1d4e5246066e5f4fbb02a011a1f91ca8a2
  Author: gfgtdf <daniel.gfgtdf at gmail.com>
  Date:   2016-09-21 (Wed, 21 Sep 2016)

  Changed paths:
    M src/fake_unit_manager.hpp
    M src/game_display.cpp
    M src/gui/widgets/tree_view.cpp
    M src/gui/widgets/tree_view.hpp
    M src/gui/widgets/tree_view_node.cpp
    M src/gui/widgets/tree_view_node.hpp
    M src/playsingle_controller.cpp

  Log Message:
  -----------
  attempt to fix UB in tree_view and unit drawer.

since the treeview nodes are not owned by the treeview but by the
content grid, they get destroyed after the treeview so accesing the
treeview in the nodes dtor might result in UB.

Also UB happend in playsingle_controller and unit_drawer::unit_drawer
in case that the teams vector was empty.





More information about the Commits mailing list