Skip to content
Snippets Groups Projects
Commit d847169d authored by Baptiste LENIAU's avatar Baptiste LENIAU
Browse files

Fix break segmentation issue when closing then opening canvas

git-svn-id: svn+ssh://svn.in2p3.fr/class@186 0e7d625b-0364-4367-a6be-d5be4a48d228
parent 9440553d
No related branches found
No related tags found
No related merge requests found
......@@ -215,10 +215,10 @@ void CLASSRead::Plot(vector<CLASSPlotElement> toplot, string opt)
for(int i=0; i < fNumberGraphIterator;i++) delete fLegend[i];
delete [] fLegend;
}
if(fCNuclei)
delete fCNuclei;
if(fCNuclei && gROOT->FindObject("c_Nuclei"))
{ delete fCNuclei;
fCNuclei=0;
}
fCNuclei = new TCanvas("c_Nuclei","Nuclei",50,110,400,300);
......@@ -307,8 +307,10 @@ void CLASSRead::PlotPower(vector<CLASSPlotElement> toplot, string opt)
delete [] fLegendPower;
}
if(fCPower)
delete fCPower;
if(fCPower && gROOT->FindObject("fCPower"))
{ delete fCPower;
fCPower=0;
}
fCPower = new TCanvas("fCPower","Power",50,110,400,300);
......
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