Skip to content
Snippets Groups Projects
Commit dd5feb00 authored by Philippe Canal's avatar Philippe Canal
Browse files

TIsAProxy: Don't record failed searches (a library might be loaded between...

TIsAProxy:  Don't record failed searches (a library might be loaded between now and the next search).
parent c6498f6b
No related branches found
No related tags found
No related merge requests found
...@@ -118,10 +118,13 @@ TClass* TIsAProxy::operator()(const void *obj) ...@@ -118,10 +118,13 @@ TClass* TIsAProxy::operator()(const void *obj)
// Check if type is already in sub-class cache // Check if type is already in sub-class cache
auto last = ToPair(FindSubType(typ)); auto last = ToPair(FindSubType(typ));
if ( last == nullptr || last->second == nullptr ) { if ( last == nullptr ) {
// Last resort: lookup root class // Last resort: lookup root class
auto cls = TClass::GetClass(*typ); auto cls = TClass::GetClass(*typ);
last = ToPair(CacheSubType(typ,cls)); if (cls)
last = ToPair(CacheSubType(typ,cls));
else
return nullptr; // Don't record failed searches (a library might be loaded between now and the next search).
} }
UChar_t next = fNextLastSlot++; UChar_t next = fNextLastSlot++;
...@@ -132,7 +135,7 @@ TClass* TIsAProxy::operator()(const void *obj) ...@@ -132,7 +135,7 @@ TClass* TIsAProxy::operator()(const void *obj)
} }
fLasts[next].store(last); fLasts[next].store(last);
return last == nullptr ? nullptr: last->second; return last == nullptr ? nullptr : last->second;
} }
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment