if (argAggregate) {
if (argAggregate->getSequence().empty())
return;
- bufferObj = argAggregate->getSequence()[0]->getAsTyped();
+ if (argAggregate->getSequence()[0])
+ bufferObj = argAggregate->getSequence()[0]->getAsTyped();
} else {
bufferObj = arguments->getAsSymbolNode();
}
if (arguments->getAsTyped()->getBasicType() != EbtSampler)
return;
} else {
- if (argAggregate->getSequence().size() == 0 ||
+ if (argAggregate->getSequence().size() == 0 ||
+ argAggregate->getSequence()[0] == nullptr ||
argAggregate->getSequence()[0]->getAsTyped()->getBasicType() != EbtSampler)
return;
}
TIntermTyped* arg0 = nullptr;
- if (aggregate && aggregate->getSequence().size() > 0)
+ if (aggregate && aggregate->getSequence().size() > 0 && aggregate->getSequence()[0])
arg0 = aggregate->getSequence()[0]->getAsTyped();
else if (arguments->getAsSymbolNode())
arg0 = arguments->getAsSymbolNode();
std::any_of(aggregate->getSequence().begin(),
aggregate->getSequence().end(),
[this](const TIntermNode* node) {
- return (node->getAsTyped() != nullptr) && hasStructBuffCounter(node->getAsTyped()->getType());
+ return (node && node->getAsTyped() != nullptr) && hasStructBuffCounter(node->getAsTyped()->getType());
});
// Nothing to do, if we didn't find one.