From d0d96581616e017f7ad69a21ce0cf2bb090a3984 Mon Sep 17 00:00:00 2001 From: otavepto Date: Tue, 9 Apr 2024 12:29:08 +0200 Subject: [PATCH] ensure renderer hook isn't null --- overlay_experimental/steam_overlay.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/overlay_experimental/steam_overlay.cpp b/overlay_experimental/steam_overlay.cpp index 3157af6f..68265991 100644 --- a/overlay_experimental/steam_overlay.cpp +++ b/overlay_experimental/steam_overlay.cpp @@ -200,7 +200,11 @@ void Steam_Overlay::renderer_hook_init_thread() // do a one time initialization // std::lock_guard lock(overlay_mutex); _renderer = future_renderer.get(); - PRINT_DEBUG("got renderer %p", _renderer); + if (!_renderer) { // is this even possible? + PRINT_DEBUG("renderer hook was null!"); + return; + } + PRINT_DEBUG("got renderer hook %p for '%s'", _renderer, _renderer->GetLibraryName().c_str()); // note: make sure to load all relevant strings before creating the font(s), otherwise some glyphs ranges will be missing load_achievements_data();