[Commits] [wesnoth/wesnoth] 7dc8c7: fix an assertion failure if an add-on is not avail...

GitHub noreply at github.com
Sun Mar 15 22:23:12 UTC 2015


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 7dc8c70e4720f77cf9a03594623c0f97623063b3
      https://github.com/wesnoth/wesnoth/commit/7dc8c70e4720f77cf9a03594623c0f97623063b3
  Author: Chris Beck <render787 at gmail.com>
  Date:   2015-03-15 (Sun, 15 Mar 2015)

  Changed paths:
    M src/addon/manager_ui.cpp

  Log Message:
  -----------
  fix an assertion failure if an add-on is not available on server

If someone hosts an mp game using an add-on which is not published,
the client of another player cannot know that, so it may prompt
them to connect to the add-on server and try to download.

However the previous implementation of "ad_hoc_addon_fetch_session"
used the "addon_at" helper function, which gives an assertion
failure if the add-on does not exist, presumably because this was
used only with the add-on manager gui before.

In this commit we change the fetch session function to explicitly
search for the addon id and handle a missing add-on with an error
message rather than assertion failure.





More information about the Commits mailing list