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