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

fix crash when deleting views in some cases when we have aliases of aliases (old bug)

parent bc71e3c3
No related branches found
No related tags found
No related merge requests found
...@@ -58,7 +58,15 @@ PView::PView(PViewData *data, int num) ...@@ -58,7 +58,15 @@ PView::PView(PViewData *data, int num)
PView::PView(PView *ref, bool copyOptions) PView::PView(PView *ref, bool copyOptions)
{ {
_init(); _init();
_aliasOf = ref->getNum();
if(ref->getAliasOf()){ // alias of an alias
PView *orig = getViewByNum(ref->getAliasOf());
if(orig) _aliasOf = orig->getNum();
else Msg::Error("Could not find original view for alias");
}
else
_aliasOf = ref->getNum();
_data = ref->getData(); _data = ref->getData();
if(copyOptions) if(copyOptions)
_options = new PViewOptions(*ref->getOptions()); _options = new PViewOptions(*ref->getOptions());
......
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