Segmetation violation: TF1 from Eval a TGraph

Hello,

My problem is the following: I want to define a TF1 from a TGraph. For this I define a double that evaluates the TGraph and returns its value. After, i use this double to create a TF1. Everything works well, except when I want to Draw the TF1, that I get a segmentation violation. Has somebody had this problem before? The TF1 is well computed and I can use if for calculations later, but the Draw option always gives problem. I write the piece of my code (The class is QGrav). Thank you very much for your help.

Double_t QGrav::transfunc2(Double_t *x, Double_t *par)
{
return par[0]*exp(-tauvse->Eval(x[0]));
}

f2 = new TF1(“f2”, this, &QGrav::transfunc2, 0., 4.5, 1, “QGrav”,“transfunc2”);
f2->SetParameter(0, 1.);
TCanvas *function = new TCanvas();
f2->Draw();

In your partial example what is tauvse?
Can you also attach the traceback?