Fixed some errors related to disconnecting
This commit is contained in:
parent
9649135f43
commit
65436429b8
7 changed files with 119 additions and 56 deletions
|
|
@ -96,6 +96,10 @@ void MainProgram::update() {
|
|||
setTabToClose.reset();
|
||||
}
|
||||
|
||||
std::erase_if(worlds, [&](const std::shared_ptr<World>& w) {
|
||||
return w->setToDestroy;
|
||||
});
|
||||
|
||||
if(worldIndex >= worlds.size())
|
||||
worldIndex = worlds.size() - 1;
|
||||
if(worlds.size() == 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue