From 42bd2cba8166643477122f66c7c6c2d5cdd115a5 Mon Sep 17 00:00:00 2001 From: Peter Repukat Date: Tue, 20 Sep 2022 20:43:37 +0200 Subject: [PATCH] Block window refocusing if handle == nullptr --- GlosSITarget/SteamTarget.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/GlosSITarget/SteamTarget.cpp b/GlosSITarget/SteamTarget.cpp index b11a51a..89feee7 100644 --- a/GlosSITarget/SteamTarget.cpp +++ b/GlosSITarget/SteamTarget.cpp @@ -181,6 +181,9 @@ void SteamTarget::toggleGlossiOverlay() void SteamTarget::focusWindow(WindowHandle hndl) { + if (reinterpret_cast(hndl) == 0) { + return; + } #ifdef _WIN32 if (hndl == target_window_handle_) { spdlog::debug("Bring own window to foreground");