Skip to content

Commit 3c31161

Browse files
committed
jSON parsing crashes when done from the network thread, so move the config initialization back on the main thread
1 parent e3b06d2 commit 3c31161

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

sa-mp_masterlist_fix/fix.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,12 @@ void Fix::EarlyInitialize()
161161
// would probably fail since it has not yet been self-unpacked
162162
// The actual initialization is done the first time GetProcAddress gets called
163163

164+
if (!m_config.Load())
165+
{
166+
assert(false && "Invalid configuration");
167+
return;
168+
}
169+
164170
urmem::address_t realGetProcAddress = urmem::get_func_addr(::GetProcAddress);
165171
urmem::address_t hookGetProcAddress = urmem::get_func_addr(Fix::GetProcAddress);
166172

@@ -174,12 +180,6 @@ bool Fix::Initialize()
174180
return true;
175181
}
176182

177-
if (!m_config.Load())
178-
{
179-
assert(false && "Invalid configuration");
180-
return false;
181-
}
182-
183183
if (!m_browser.ScanSignatures())
184184
{
185185
// We're injected into a random process or in an unsupported SA-MP server browser version

0 commit comments

Comments
 (0)