Skip to content

Commit

Permalink
Lock cache of TClassRef
Browse files Browse the repository at this point in the history
Make sure to lock access to the TClassRef cache to avoid a data
race.
  • Loading branch information
Dr15Jones committed Oct 14, 2014
1 parent f8a6ace commit 849965b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/meta/src/TBaseClass.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include "TBaseClass.h"
#include "TClass.h"
#include "TInterpreter.h"
#include "TVirtualMutex.h"

//////////////////////////////////////////////////////////////////////////
// //
Expand Down Expand Up @@ -61,7 +62,8 @@ void TBaseClass::Browse(TBrowser *b)
TClass *TBaseClass::GetClassPointer(Bool_t load)
{
// Get pointer to the base class TClass.


R__LOCKGUARD(gCINTMutex);
if (!fClassPtr) fClassPtr = TClass::GetClass(fName, load);
return fClassPtr;
}
Expand Down

0 comments on commit 849965b

Please sign in to comment.