Skip to content
Snippets Groups Projects
Commit 9d585464 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

don't load dataset if model is empty

parent 583f838c
No related branches found
No related tags found
No related merge requests found
......@@ -88,6 +88,12 @@ bool PView::readMSH(std::string fileName, int fileIndex)
return false;
}
GModel *model = GModel::current();
if(model->empty()){
Msg::Error("Model is empty: please load a mesh before loading the dataset");
return false;
}
char str[256] = "XXX";
int index = -1;
bool binary = false, swap = false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment