Fitting Histograms :: null pointer error

Well, try to add “gPad->Modifed(); gPad->Update();” right before “gPad->AddExec(...);”.

If you are using Mac OS X with Cocoa, maybe you need to add one or two calls “gSystem->ProcessEvents();” after each “some_pad_or_canvas->Update();”.

If it doesn’t help, maybe @couet has some idea.