You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This code seems to exhibit UB, sometimes getting the keyword would work.. but most of the time it is null. And sometimes it crashes.
if (auto actor = a_ref->As<RE::Actor>(); actor) {
auto dobj = RE::BGSDefaultObjectManager::GetSingleton();
if (!dobj) {
logger::error("This was it, the segfault. dobj was null"); //said line 112, which was an empty line after animal_keyword =returnfalse;
}
auto animal_keyword = dobj->GetObject<RE::BGSKeyword>(RE::DEFAULT_OBJECT::kKeywordAnimal);
// actor was already checkedif (!actor->IsDead()
|| actor->IsSummoned()
|| (disable_for_animals && actor->HasKeyword(animal_keyword)))
{
returnfalse;
}
}
ref CharmedBaryon#68
The added constructor (w/ new DeviceFactory) causes linker error attempting to call `BSInputDevice::IsPressed()` virtual function, this forces compiler to instantiate the class.
This code seems to exhibit UB, sometimes getting the keyword would work.. but most of the time it is null. And sometimes it crashes.
Could be related to #66
The text was updated successfully, but these errors were encountered: