Project

General

Profile

Actions

Bug #2459

closed

common: null deref possible

Added by Sweet Tea Dorminy 16 days ago. Updated 14 days ago.

Status:
Closed
Priority:
Normal
Category:
-
Target version:
-
Start date:
11/08/2026
Due date:
% Done:

0%

Estimated time:

Description

unit_current_goods() returns null when no goods type's requirements hold for the unit's home city under "Leaving" selection. Shipped rulesets with a single requirement-free Goods type never hit it; sandbox (eight goods types, seven with requirements) and modded rulesets can, and the trade route branch of actres_possible() then dereferences it.

Patch: no goods, no route.


Files


Related issues 1 (0 open — 1 closed)

Related to Bug #2179: Server segfault when city cannot provide goodsClosedMarko Lindqvist08/29/2026

Actions
Actions #1

Updated by Marko Lindqvist 16 days ago

  • Related to Bug #2179: Server segfault when city cannot provide goods added
Actions #2

Updated by Marko Lindqvist 14 days ago

Is there another crash beyond what #2179 fixes? If yes, this patch still needs to be rebased on top of #2179.

Actions #3

Updated by Sweet Tea Dorminy 14 days ago

Yep, this is a duplicate. Thanks for noticing!

Actions #4

Updated by Marko Lindqvist 14 days ago

  • Status changed from New to Closed
  • Assignee set to Marko Lindqvist
Actions

Also available in: Atom PDF