Commit 9e5e6fe1 authored by Kenneth Vanhoey's avatar Kenneth Vanhoey

viewer.cpp : check if filename is not empty before opening a mesh. Otherwise...

viewer.cpp : check if filename is not empty before opening a mesh. Otherwise SIGSEGV if cancel Open process
parent 90e70ff1
......@@ -166,6 +166,8 @@ void Viewer::cb_Open()
{
std::string filters("all (*.*);; trian (*.trian);; ctm (*.ctm);; off (*.off);; ply (*.ply)") ;
std::string filename = selectFile("Open Mesh", "", filters) ;
if (filename.empty())
return ;
importMesh(filename) ;
updateGL() ;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment