mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Check ptr for 's_pLevelSetKV' before deleting
Only delete if the pointer is valid to prevent segmentation fault.
This commit is contained in:
parent
009fd49e7f
commit
1f10bb1643
@ -244,8 +244,12 @@ void Mod_ProcessPakQueue()
|
||||
g_pakLoadApi->UnloadPak(*(RPakHandle_t*)v10);
|
||||
Mod_UnloadPakFile(); // Unload mod pak files.
|
||||
|
||||
s_pLevelSetKV->DeleteThis(); // Delete current level settings if we drop all paks..
|
||||
s_pLevelSetKV = nullptr;
|
||||
if (s_pLevelSetKV)
|
||||
{
|
||||
// Delete current level settings if we drop all paks..
|
||||
s_pLevelSetKV->DeleteThis();
|
||||
s_pLevelSetKV = nullptr;
|
||||
}
|
||||
}
|
||||
if (v13 && (unsigned int)(v13 - 13) > 1)
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user