From 77ff74d6e1c5ed247a94ca05e6005e343c24702c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20Serba?= Date: Wed, 23 Jul 2025 13:29:16 +0000 Subject: [PATCH] apply changes suggested by Detanup01 in a PR --- dll/steam_client_interface_getter.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/dll/steam_client_interface_getter.cpp b/dll/steam_client_interface_getter.cpp index 49b82bdd..de550f00 100644 --- a/dll/steam_client_interface_getter.cpp +++ b/dll/steam_client_interface_getter.cpp @@ -97,19 +97,17 @@ ISteamUser *Steam_Client::GetISteamUser( HSteamUser hSteamUser, HSteamPipe hStea { PRINT_DEBUG("%s", pchVersion); + if (!hSteamUser) { + return NULL; + } if (!steam_pipes.count(hSteamPipe)) { // Fallback for steamclient_experimental build: if pipe 1 is requested but not found, // and we have other valid pipes, continue execution instead of returning NULL - if (hSteamPipe == 1 && !steam_pipes.empty()) { - // Continue with function execution using available pipes - } else { + if (hSteamPipe == 1 || !steam_pipes.empty()) { return NULL; } } - if (!hSteamUser) { - return NULL; - } if (strcmp(pchVersion, "SteamUser004") == 0) { return reinterpret_cast(static_cast(steam_user)); // sdk 0.99u