Fix rare crash with logs (#2161)

* Fix rare crash with logs

* Nullcheck instead

* Update smn_filesystem.cpp

---------

Co-authored-by: Kenzzer <[email protected]>
This commit is contained in:
Benoist
2024-05-24 13:10:24 +02:00
committed by GitHub
co-authored by Kenzzer
parent e07c120cab
commit 4e73713fab
+4
View File
@@ -317,6 +317,10 @@ public:
}
virtual bool LogPrint(const char *msg)
{
if (!g_pLogHook) {
return false;
}
cell_t result = 0;
g_pLogHook->PushString(msg);
g_pLogHook->Execute(&result);