[wesnoth-commits] [wesnoth/wesnoth] b4d171: GUI2: small misc cleanup things

Charles Dang noreply at github.com
Tue Apr 12 11:15:20 UTC 2022


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: b4d1717767c41a2d2406e6495e329df3353b566b
      https://github.com/wesnoth/wesnoth/commit/b4d1717767c41a2d2406e6495e329df3353b566b
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2022-04-12 (Tue, 12 Apr 2022)

  Changed paths:
    M src/gui/core/event/dispatcher_private.hpp
    M src/gui/core/event/distributor.cpp
    M src/gui/core/event/handler.hpp
    M src/gui/core/gui_definition.cpp

  Log Message:
  -----------
  GUI2: small misc cleanup things


  Commit: 9caf43ed732f621d6d752ff5dede54466d5d4b4c
      https://github.com/wesnoth/wesnoth/commit/9caf43ed732f621d6d752ff5dede54466d5d4b4c
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2022-04-12 (Tue, 12 Apr 2022)

  Changed paths:
    M src/gui/core/event/distributor.cpp

  Log Message:
  -----------
  GUI2/Distributor: address *potential* nullptr dereference

This has been here since 2009 when this block of code was added (0d72daac2e1157f0d069ff07eb359a9581272cdc).
It's not clear mouse_focus_ would ever be null here, but if it ever was, this would have tried to deference
it and crash. To be safe, I've wrapped both fire() calls in a not-null check.


Compare: https://github.com/wesnoth/wesnoth/compare/d2e0fb32f838...9caf43ed732f



More information about the Commits mailing list