App doesn't crash when attempting to open bad file through double click
This commit is contained in:
parent
354c6e4cdc
commit
12bb936c16
5 changed files with 11 additions and 15 deletions
|
|
@ -108,9 +108,7 @@ void DesktopDrawingProgramScreen::on_tab_close() {
|
|||
main.create_new_tab({
|
||||
.isClient = false
|
||||
});
|
||||
else if(main.world)
|
||||
main.worldIndex = std::find(main.worlds.begin(), main.worlds.end(), main.world) - main.worlds.begin();
|
||||
else
|
||||
else if(!main.world)
|
||||
main.switch_to_tab(0);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue