diff --git a/core/base/src/TSystem.cxx b/core/base/src/TSystem.cxx index 1104e430225112b6b393a2c87c761114299898f5..bad725ff9778d2e723766a5ffa1d6ddc9974b46e 100644 --- a/core/base/src/TSystem.cxx +++ b/core/base/src/TSystem.cxx @@ -1765,7 +1765,6 @@ int TSystem::Load(const char *module, const char *entry, Bool_t system) AbstractMethod("Load"); return 0; #else - static int recCall = 0; // don't load libraries that have already been loaded TString libs( GetLibraries() ); @@ -1814,8 +1813,6 @@ int TSystem::Load(const char *module, const char *entry, Bool_t system) } } - recCall++; - char *path = DynamicPathName(module); int ret = -1; @@ -1848,7 +1845,6 @@ int TSystem::Load(const char *module, const char *entry, Bool_t system) deplib, ((TObjString*)tokens->At(0))->GetName()); if ((ret = Load(deplib, "", system)) < 0) { delete tokens; - recCall--; return ret; } } @@ -1896,15 +1892,6 @@ int TSystem::Load(const char *module, const char *entry, Bool_t system) delete [] path; } - recCall--; - - // will load and initialize graphics libraries if - // TApplication::NeedGraphicsLibs() has been called by a - // library static initializer, only do this when Load() is - // not called recursively - if (recCall == 0 && gApplication) - gApplication->InitializeGraphics(); - if (!entry || !entry[0] || ret < 0) return ret; Func_t f = DynFindSymbol(module, entry); diff --git a/core/meta/src/TCling.cxx b/core/meta/src/TCling.cxx index db474d311f4459cc9799eb9b22882f2d32e3f882..978a008f70c7000a326607aa8311368c9095caae 100644 --- a/core/meta/src/TCling.cxx +++ b/core/meta/src/TCling.cxx @@ -568,6 +568,7 @@ void* autoloadCallback(const std::string& mangled_name) return 0; } } + //fprintf(stderr, "load succeeded.\n"); // Get the address of the function being called. void* addr = llvm::sys::DynamicLibrary::SearchForAddressOfSymbol(mangled_name.c_str()); diff --git a/graf2d/gpad/src/TCanvas.cxx b/graf2d/gpad/src/TCanvas.cxx index f7a03d71dc100eae70fa2260f0ea881cb2141e4f..f3a8c7f848cf5bb6b825629273f62903fadc7492 100644 --- a/graf2d/gpad/src/TCanvas.cxx +++ b/graf2d/gpad/src/TCanvas.cxx @@ -492,6 +492,12 @@ void TCanvas::Init() if (!gApplication) TApplication::CreateApplication(); + // Load and initialize graphics libraries if + // TApplication::NeedGraphicsLibs() has been called by a + // library static initializer. + if (gApplication) + gApplication->InitializeGraphics(); + // Get some default from .rootrc. Used in fCanvasImp->InitWindow(). fHighLightColor = gEnv->GetValue("Canvas.HighLightColor", kRed); SetBit(kMoveOpaque, gEnv->GetValue("Canvas.MoveOpaque", 0));