[wesnoth-commits] [wesnoth/wesnoth] a58712: Fix [change_theme] crashing when theme= isn't spec...

GitHub noreply at github.com
Sun May 20 02:38:21 UTC 2018


  Branch: refs/heads/1.14
  Home:   https://github.com/wesnoth/wesnoth
  Commit: a58712a539ef53c39f4c6e23bba1d3c35f7be7ca
      https://github.com/wesnoth/wesnoth/commit/a58712a539ef53c39f4c6e23bba1d3c35f7be7ca
  Author: Iris Morelle <shadowm at wesnoth.org>
  Date:   2018-05-19 (Sat, 19 May 2018)

  Changed paths:
    M changelog.md
    M data/lua/wml-tags.lua

  Log Message:
  -----------
  Fix [change_theme] crashing when theme= isn't specified

Leaving theme= unspecified ought to have the same effect as providing it
and setting it to an empty string. Without the check for a nil value,
however, it would result in a crash like this:

  20180519 22:31:54 error scripting/lua: lua/wml-tags.lua:922: bad argument #3 to '__newindex' (string expected, got nil)
  stack traceback:
    [C]: in metamethod '__newindex'
    lua/wml-tags.lua:922: in local 'cmd'
    lua/wml-utils.lua:145: in field 'handle_event_commands'
    lua/wml-flow.lua:6: in function <lua/wml-flow.lua:5>



      **NOTE:** This service been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

      Functionality will be removed from GitHub.com on January 31st, 2019.


More information about the Commits mailing list