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:
@@ -317,6 +317,10 @@ public:
|
|||||||
}
|
}
|
||||||
virtual bool LogPrint(const char *msg)
|
virtual bool LogPrint(const char *msg)
|
||||||
{
|
{
|
||||||
|
if (!g_pLogHook) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
cell_t result = 0;
|
cell_t result = 0;
|
||||||
g_pLogHook->PushString(msg);
|
g_pLogHook->PushString(msg);
|
||||||
g_pLogHook->Execute(&result);
|
g_pLogHook->Execute(&result);
|
||||||
|
|||||||
Reference in New Issue
Block a user