mirror of
https://github.com/ValveSoftware/Proton.git
synced 2024-12-27 07:05:46 +03:00
lsteamclient: Allow callbacks to be NULL
Steamworks API seems to accept NULL callbacks, simply avoiding to call them when this is the case.
This commit is contained in:
parent
8a6964bb3c
commit
c559773d00
@ -113,6 +113,9 @@ void *create_LinuxISteamMatchmakingServerListResponse(void *win, const char *ver
|
||||
{
|
||||
struct gccServerListResponse *ret;
|
||||
|
||||
if (!win)
|
||||
return NULL;
|
||||
|
||||
/* FIXME: When is it save to free this? CancelServerQuery? */
|
||||
ret = (struct gccServerListResponse *)HeapAlloc(GetProcessHeap(), 0, sizeof(*ret));
|
||||
if(!ret)
|
||||
@ -163,6 +166,9 @@ void *create_LinuxISteamMatchmakingPingResponse(void *win, const char *version)
|
||||
{
|
||||
struct gccPingResponse *ret;
|
||||
|
||||
if (!win)
|
||||
return NULL;
|
||||
|
||||
ret = (struct gccPingResponse *)HeapAlloc(GetProcessHeap(), 0, sizeof(*ret));
|
||||
if(!ret)
|
||||
return NULL;
|
||||
@ -217,6 +223,9 @@ void *create_LinuxISteamMatchmakingPlayersResponse(void *win, const char *versio
|
||||
{
|
||||
struct gccPlayersResponse *ret;
|
||||
|
||||
if (!win)
|
||||
return NULL;
|
||||
|
||||
ret = (struct gccPlayersResponse *)HeapAlloc(GetProcessHeap(), 0, sizeof(*ret));
|
||||
if(!ret)
|
||||
return NULL;
|
||||
@ -271,6 +280,9 @@ void *create_LinuxISteamMatchmakingRulesResponse(void *win, const char *version)
|
||||
{
|
||||
struct gccRulesResponse *ret;
|
||||
|
||||
if (!win)
|
||||
return NULL;
|
||||
|
||||
ret = (struct gccRulesResponse *)HeapAlloc(GetProcessHeap(), 0, sizeof(*ret));
|
||||
if(!ret)
|
||||
return NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user