mirror of
https://github.com/acidicoala/SmokeAPI.git
synced 2026-01-24 13:32:51 -05:00
Added null checks
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
cmake_minimum_required(VERSION 3.24)
|
||||
|
||||
project(SmokeAPI VERSION 4.1.1)
|
||||
project(SmokeAPI VERSION 4.1.3)
|
||||
|
||||
include(KoalaBox/cmake/KoalaBox.cmake)
|
||||
add_subdirectory(KoalaBox)
|
||||
|
||||
2
KoalaBox
2
KoalaBox
Submodule KoalaBox updated: 383a354d77...26c9a26337
@@ -224,7 +224,10 @@ namespace {
|
||||
if(const auto lib_bitness = kb::lib::get_bitness(lib_path)) {
|
||||
if(static_cast<uint8_t>(*lib_bitness) == kb::platform::bitness) {
|
||||
if(const auto lib_handle = kb::lib::load(lib_path)) {
|
||||
LOG_INFO("Found original library: {}", kb::path::to_str(lib_path));
|
||||
LOG_INFO(
|
||||
"Found & loaded original library '{}' @ {}",
|
||||
kb::path::to_str(lib_path), *lib_handle
|
||||
);
|
||||
|
||||
original_steamapi_handle = *lib_handle;
|
||||
proxy_exports::init(self_module_handle, original_steamapi_handle);
|
||||
|
||||
@@ -15,8 +15,10 @@ namespace steam_client {
|
||||
if(interface_version) {
|
||||
LOG_DEBUG("{} -> '{}' @ {}", function_name, interface_version, interface);
|
||||
|
||||
if(interface) {
|
||||
steam_interfaces::hook_virtuals(interface, interface_version);
|
||||
}
|
||||
}
|
||||
|
||||
return interface;
|
||||
} catch(const std::exception& e) {
|
||||
|
||||
@@ -237,13 +237,10 @@ namespace steam_interfaces {
|
||||
continue;
|
||||
}
|
||||
|
||||
const auto* const interface_ptr = ISteamClient_GetISteamGenericInterface(
|
||||
ISteamClient_GetISteamGenericInterface(
|
||||
ARGS(steam_user, steam_pipe, interface_version.c_str())
|
||||
);
|
||||
|
||||
if(not interface_ptr) {
|
||||
LOG_ERROR("Failed to get generic interface: '{}'", interface_version)
|
||||
}
|
||||
}
|
||||
} catch(const std::exception& e) {
|
||||
LOG_ERROR("{} -> Unhandled exception: {}", __func__, e.what());
|
||||
|
||||
Reference in New Issue
Block a user