Fuction call


I am creating a gui and have been trying to call a function that is in the MainFrame class from a class that creates a dialog box such that when I close the dialog box it calls this function.

I have my function:

void AddHistArray(const char* chainname, const char* arrayname, const char* plotname);

that I call in the slot Close() function via a pointer:

fFrame -> AddHistArray(“chainname”, “arrayname”, “plotname”);

However, when I try to close the dialog box ROOT doesn’t seem to like it. The dialog box does not close and I get the attached errors. Is there a way of calling my function successfully?


DialogErrors.C (2.19 KB)

Is fFrame still valid in the close method?

Cheers, Fons.

Hi Fons,

Yes, it should be. fFrame is a data member of my Dialog class that is a pointer to my MainFrame class.


Run root.exe in a debugger and see where the problem really is (i.e. whihc action does it try to do and on which variable.