From 489ae66e964670c2f761e6cac39434ce7ae4cf35 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 6a0b835..f7b8a91 100644 --- a/src/solvespace.cpp +++ b/src/solvespace.cpp @@ -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();