human_player_gui.c: fix segfault when selecting one unit
Checking against `sel` is just plain wrong, since it always expected to be non-NULL, since `h->sel` is an array defined in `struct human_player`. Instead, `sel->d.i` is the pointer that should be checked.
This commit is contained in:
parent
e869bfd0f6
commit
a746ecd0b6
|
@ -206,7 +206,7 @@ static int render_sel_single(const struct human_player *const h,
|
|||
{
|
||||
const struct sel_instance *const sel = &h->sel[i];
|
||||
|
||||
if (sel)
|
||||
if (sel->d.i)
|
||||
{
|
||||
switch (sel->type)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue