Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix a crash when opening an empty file.
Fixes: #918 The problem was that here: https://github.com/solvespace/solvespace/blob/11a8a0abd5e21a0da6c818674f8b4b657a401a6c/src/file.cpp#L480 we cleared all groups. Then we tried to read an empty file and therefore this `while` exited immediately: https://github.com/solvespace/solvespace/blob/11a8a0abd5e21a0da6c818674f8b4b657a401a6c/src/file.cpp#L487 and we came to here: https://github.com/solvespace/solvespace/blob/11a8a0abd5e21a0da6c818674f8b4b657a401a6c/src/file.cpp#L548 where there was no `fileLoadError` and thus we were left with no groups, and so this assert failed: https://github.com/solvespace/solvespace/blob/11a8a0abd5e21a0da6c818674f8b4b657a401a6c/src/graphicswin.cpp#L394 since is is not allowed to have no groups :-)
- Loading branch information