mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Fix shutdown crash on debug builds
The destruction of these crashed due to dereferencing an invalid pointer. Not making them inline fixes the problem. This problem only occurred on debug builds, other build configurations were not affected.
This commit is contained in:
parent
165d80c541
commit
f87fb2b2d6
@ -4,6 +4,9 @@
|
||||
std::shared_ptr<spdlog::logger> g_TermLogger;
|
||||
std::shared_ptr<spdlog::logger> g_ImGuiLogger;
|
||||
|
||||
std::ostringstream g_LogStream;
|
||||
std::shared_ptr<spdlog::sinks::ostream_sink_st> g_LogSink;
|
||||
|
||||
//#############################################################################
|
||||
// SPDLOG INIT
|
||||
//#############################################################################
|
||||
@ -24,6 +27,7 @@ void SpdLog_Init(void)
|
||||
* IMGUI LOGGER SETUP *
|
||||
************************/
|
||||
{
|
||||
g_LogSink = std::make_shared<spdlog::sinks::ostream_sink_st>(g_LogStream);
|
||||
g_ImGuiLogger = std::make_shared<spdlog::logger>("game_console", g_LogSink);
|
||||
spdlog::register_logger(g_ImGuiLogger); // in-game console logger.
|
||||
g_ImGuiLogger->set_pattern("[0.000] %v");
|
||||
|
@ -21,8 +21,8 @@ extern std::shared_ptr<spdlog::logger> g_ImGuiLogger;
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// IMGUI CONSOLE SINK |
|
||||
inline std::ostringstream g_LogStream;
|
||||
inline auto g_LogSink = std::make_shared<spdlog::sinks::ostream_sink_st>(g_LogStream);
|
||||
extern std::ostringstream g_LogStream;
|
||||
extern std::shared_ptr<spdlog::sinks::ostream_sink_st> g_LogSink;
|
||||
|
||||
void SpdLog_Init(void);
|
||||
void SpdLog_Create(void);
|
||||
|
@ -15,6 +15,9 @@
|
||||
#include "rtech/rtech_utils.h"
|
||||
#include "public/studio.h"
|
||||
|
||||
RMDLFallBack_t* g_pMDLFallback = new RMDLFallBack_t();
|
||||
std::unordered_set<MDLHandle_t> g_vBadMDLHandles;
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: finds an MDL
|
||||
|
@ -60,8 +60,8 @@ struct studiodata_t
|
||||
int m_nGuidLock; // always -1, set to 1 and 0 in CMDLCache::FindUncachedMDL.
|
||||
};
|
||||
|
||||
inline RMDLFallBack_t* g_pMDLFallback = new RMDLFallBack_t();
|
||||
inline std::unordered_set<MDLHandle_t> g_vBadMDLHandles;
|
||||
extern RMDLFallBack_t* g_pMDLFallback;
|
||||
extern std::unordered_set<MDLHandle_t> g_vBadMDLHandles;
|
||||
|
||||
class CMDLCache
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user