mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[sequence] Fixed crash due to undefined sequence
Change-Id: Ie67ff4aa9a53eb8b04535e3b61737e11c9049316
This commit is contained in:
committed by
Émilie Feral
parent
b8544e3708
commit
51002066e9
@@ -87,9 +87,14 @@ void TemplatedSequenceContext<T>::step(SequenceContext * sqctx, int sequenceInde
|
||||
SequenceStore * sequenceStore = sqctx->sequenceStore();
|
||||
stop = stepMultipleSequences ? sequenceStore->numberOfModels() : start + 1;
|
||||
for (int i = start; i < stop; i++) {
|
||||
Sequence * u = sequenceStore->modelForRecord(sequenceStore->recordAtIndex(i));
|
||||
int index = stepMultipleSequences ? SequenceStore::sequenceIndexForName(u->fullName()[0]) : 0;
|
||||
sequences[index] = u->isDefined() ? u : nullptr;
|
||||
Ion::Storage::Record record = sequenceStore->recordAtIndex(i);
|
||||
if (!record.isNull()) {
|
||||
Sequence * u = sequenceStore->modelForRecord(record);
|
||||
int index = stepMultipleSequences ? SequenceStore::sequenceIndexForName(u->fullName()[0]) : 0;
|
||||
sequences[index] = u->isDefined() ? u : nullptr;
|
||||
} else {
|
||||
sequences[i] = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
// We approximate the value of the next rank for each sequence we want to update
|
||||
|
||||
Reference in New Issue
Block a user