mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 11:31:49 +00:00
fix world deletion & fix segfault on attempt to reset content when world is open
This commit is contained in:
parent
010ed78aba
commit
e0440b263e
2 changed files with 5 additions and 1 deletions
|
|
@ -36,6 +36,9 @@ static int l_load_content(lua::State* L) {
|
|||
}
|
||||
|
||||
static int l_reset_content(lua::State* L) {
|
||||
if (level != nullptr) {
|
||||
throw std::runtime_error("world must be closed before");
|
||||
}
|
||||
engine->resetContent();
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue