Oops, feeding garbage to the SolveSpace file load routines would

make it return with the program in a bad state and blow up later;
so fix at least one easy case of that.

[git-p4: depot-paths = "//depot/solvespace/": change = 2114]
solver
Jonathan Westhues 2010-01-24 17:32:36 -08:00
parent c95e5c1614
commit 46cabb4d73
2 changed files with 6 additions and 2 deletions

View File

@ -464,6 +464,10 @@ bool SolveSpace::LoadFromFile(char *filename) {
if(fileLoadError) {
Error("Unrecognized data in file. This file may be corrupt, or "
"from a new version of the program.");
// At least leave the program in a non-crashing state.
if(SK.group.n == 0) {
NewFile();
}
}
return true;

View File

@ -1,15 +1,15 @@
replace show/hide links with icons?
lock point where dragged constraint
projected and signed distance constraints
rounding, as a special group
associative entities from solid model, as a special group
-----
better level of detail
associative entities from solid model, as a special group
some kind of import
faster triangulation
loop detection
IGES export
incremental regen of entities
rounding, as a special group