From 46cabb4d73a790b2c7840b0c2e0a58562c4fba96 Mon Sep 17 00:00:00 2001 From: Jonathan Westhues Date: Sun, 24 Jan 2010 17:32:36 -0800 Subject: [PATCH] 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] --- file.cpp | 4 ++++ wishlist.txt | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/file.cpp b/file.cpp index 88083dde..82535cf3 100644 --- a/file.cpp +++ b/file.cpp @@ -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; diff --git a/wishlist.txt b/wishlist.txt index 5a43562f..e9944af1 100644 --- a/wishlist.txt +++ b/wishlist.txt @@ -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