diff --git a/Geo/GModel.cpp b/Geo/GModel.cpp index 9b525febb83ca416b9887b0c32649064f85ef3a6..8bae76f4ea019309b69ed33a85421ff75251fd2f 100644 --- a/Geo/GModel.cpp +++ b/Geo/GModel.cpp @@ -66,7 +66,7 @@ GModel::~GModel() GModel *GModel::current(int index) { if(list.empty()){ - Msg::Error("No current model available: creating one"); + Msg::Warning("No current model available: creating one"); new GModel(); } if(index >= 0) _current = index; diff --git a/Graphics/drawPost.cpp b/Graphics/drawPost.cpp index 06615c6bc8a49079f4404ca21c20dc5b92664b93..4135b3f3a18bea1c315cbfc5158315ac9410f817 100644 --- a/Graphics/drawPost.cpp +++ b/Graphics/drawPost.cpp @@ -947,6 +947,14 @@ static void addElementsInArrays(PView *p, bool preprocessNormalsOnly) if(opt->skipElement(numEdges)) continue; int numComp = data->getNumComponents(opt->timeStep, ent, i); int numNodes = data->getNumNodes(opt->timeStep, ent, i); + if(numNodes > 20){ + Msg::Error("Should never draw view with > 20 nodes per element: adapt?"); + continue; + } + if(numComp > 9){ + Msg::Error("Should never draw view with > 9 components: adapt?"); + continue; + } for(int j = 0; j < numNodes; j++){ data->getNode(opt->timeStep, ent, i, j, xyz[j][0], xyz[j][1], xyz[j][2]); for(int k = 0; k < numComp; k++)