mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-02 16:38:41 +00:00
Don't crash if a Lua error occurs inside get_staticdata
This commit is contained in:
parent
d71872af23
commit
26453df2f7
4 changed files with 35 additions and 17 deletions
|
@ -510,8 +510,12 @@ ServerEnvironment::~ServerEnvironment()
|
|||
// This makes the next one delete all active objects.
|
||||
m_active_blocks.clear();
|
||||
|
||||
// Convert all objects to static and delete the active objects
|
||||
deactivateFarObjects(true);
|
||||
try {
|
||||
// Convert all objects to static and delete the active objects
|
||||
deactivateFarObjects(true);
|
||||
} catch (ModError &e) {
|
||||
m_server->addShutdownError(e);
|
||||
}
|
||||
|
||||
// Drop/delete map
|
||||
if (m_map)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue