[Commits] [wesnoth/wesnoth] 09cfb8: GUI2/Minimap: fixed a few issues with the new draw...

GitHub noreply at github.com
Mon Jul 24 23:30:37 UTC 2017


  Branch: refs/heads/accelerated_rendering
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 09cfb83d08140af219c0afc959f6bbde5467eac9
      https://github.com/wesnoth/wesnoth/commit/09cfb83d08140af219c0afc959f6bbde5467eac9
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-25 (Tue, 25 Jul 2017)

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

  Log Message:
  -----------
  GUI2/Minimap: fixed a few issues with the new drawing impl

First, the gamemap ptr wasn't reset if map creation failed, meaning the last data set was drawn instead.
Secondly, if no valid map data was provided before the canvas_draw_background function was called, you'd
get a nullptr dereference.

This fix also means invalid maps aren't drawn in the Load Game dialog as before, since the canvas will
clear the texture before calling canvas_draw_background, which will now do nothing if map_ is null.





More information about the Commits mailing list