Fix crash when trying to import not .dxf or .dwg files

pull/109/merge
Elvira Khabirova 2016-11-17 08:24:02 +03:00 committed by whitequark
parent fdd08cbead
commit 489ae66e96
1 changed files with 4 additions and 1 deletions

View File

@ -544,7 +544,10 @@ void SolveSpaceUI::MenuFile(Command id) {
ImportDxf(importFile);
} else if(Extension(importFile) == "dwg") {
ImportDwg(importFile);
} else ssassert(false, "Unexpected extension of file to import");
} else {
Error("Can't identify file type from file extension of "
"filename '%s'; try .dxf or .dwg.", importFile.c_str());
}
SS.GenerateAll(SolveSpaceUI::Generate::UNTIL_ACTIVE);
SS.ScheduleShowTW();