../../../../src/client/gui-sdl2/repodlgs.c:946:25: warning: Access to field 'id' results in a dereference of a null pointer (loaded from variable 'pbuf') [core.NullDereference]
if ((MAX_ID - pbuf->id) == utype_number(i)) {
^~~~~~~~
Seems actual bug to me. pbuf gets assigned from pwidget which has been assigned (initially) from units_dlg->end_active_widget_list, that might has no value assigned at all since fc_calloc() set it NULL. That can happen when the player has no units at all.
S3_1, clang analyzer:
Seems actual bug to me. pbuf gets assigned from pwidget which has been assigned (initially) from units_dlg->end_active_widget_list, that might has no value assigned at all since fc_calloc() set it NULL. That can happen when the player has no units at all.