Skip to content

Commit

Permalink
SDLNet_GetLocalAddresses now accepts a NULL argument.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Sep 26, 2023
1 parent 9a4e171 commit ea878c0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions SDL_net.c
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,11 @@ SDLNet_Address **SDLNet_GetLocalAddresses(int *num_addresses)
int count = 0;
SDLNet_Address **retval = NULL;

int dummy_addresses;
if (!num_addresses) {
num_addresses = &dummy_addresses;
}

*num_addresses = 0;

#ifdef __WINDOWS__
Expand Down

0 comments on commit ea878c0

Please sign in to comment.