待辦事項 #42969

Client: Make trade route drawing robust against unknown partner

啟用日期: 2021-10-02 21:26 最後更新: 2021-10-04 23:04

回報者:
負責人:
類型:
狀態:
關閉
元件:
優先權:
5 - 中
嚴重程度:
5 - 中
處理結果:
修正
檔案:
1

細節

Related to #42968

Currently player is expected to always know any trade partners of his/her own cities, but 1) it won't hurt for the client to be robust against the opposite case, and 2) that might not be true sometime in the future.

This ticket is about changing draw_trade_routes_for_city() not to crash when the trade partner from trade_partners_iterate() is NULL.

Ticket History (3/6 Histories)

2021-10-02 21:26 Updated by: cazfi
  • New Ticket "Client: Make trade route drawing robust against unknown partner" created
2021-10-02 21:31 Updated by: cazfi
評語

Even when #42968 gets fixed for the future servers, this ticket helps clients to work with older servers.

(Edited, 2021-10-02 21:32 Updated by: cazfi)
2021-10-02 21:41 Updated by: cazfi
  • 處理結果 Update from to Accepted
  • 里程碑 Update from (無) to 3.0.0 (closed)
評語

S2_6 is not affected, as there the iterator macro used contains NULL check.

2021-10-02 22:18 Updated by: cazfi
評語

Targeting to beta3, even with less than one week to go:

- Avoids a crash, one that presumably occurs quite regularly in longer games
- Is trivial (unlike the fix to actual #42968)
- Crash is a regression since 2.6 -> to anyone switching branches

2021-10-04 23:04 Updated by: cazfi
  • 狀態 Update from 開啟 to 關閉
  • 負責人 Update from (無) to cazfi
  • 處理結果 Update from Accepted to 修正

編輯

Please login to add comment to this ticket » 登入