From 6802a12a527150d20be74f0a4922c820e6aec13c Mon Sep 17 00:00:00 2001 From: Elvira Khabirova Date: Thu, 17 Nov 2016 08:24:02 +0300 Subject: [PATCH] Fix crash when trying to import not .dxf or .dwg files --- src/solvespace.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/solvespace.cpp b/src/solvespace.cpp index e1dfc4a..c923b7b 100644 --- a/src/solvespace.cpp +++ b/src/solvespace.cpp @@ -551,7 +551,10 @@ void SolveSpaceUI::MenuFile(int id) { ImportDxf(importFile); } else if(Extension(importFile) == "dwg") { ImportDwg(importFile); - } else oops(); + } 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();