fixes an multiple-load issue leading to NPE when adding empty generator
streams
This commit is contained in:
parent
64cc09d207
commit
5f244dc03a
|
@ -239,9 +239,9 @@ public class FtrDbLoader implements IWaveformDbLoader {
|
|||
long startTime = cborDecoder.readInt()*time_scale_factor;
|
||||
long endTime = cborDecoder.readInt()*time_scale_factor;
|
||||
TxGenerator gen = txGenerators.get(genId);
|
||||
FtrTx scvTx = new FtrTx(txId, gen.stream.getId(), genId, startTime, endTime, blockId, blockOffset);
|
||||
TxStream stream = gen.stream;
|
||||
FtrTx scvTx = new FtrTx(txId, stream.getId(), genId, startTime, endTime, blockId, blockOffset);
|
||||
updateTransactions(txId, scvTx);
|
||||
TxStream stream = txStreams.get(gen.stream.getId());
|
||||
if (scvTx.beginTime == scvTx.endTime) {
|
||||
stream.addEvent(new TxEvent(this, EventKind.SINGLE, txId, scvTx.beginTime));
|
||||
gen.addEvent(new TxEvent(this, EventKind.SINGLE, txId, scvTx.beginTime));
|
||||
|
|
|
@ -65,7 +65,7 @@ class TxGenerator extends AbstractTxStream {
|
|||
*/
|
||||
@Override
|
||||
public IEventList getEvents() {
|
||||
if(events.size()==0) {
|
||||
if(stream.events.size()==0) {
|
||||
try {
|
||||
List<byte[]> chunks = stream.getChunks();
|
||||
int blockid = 0;
|
||||
|
|
Loading…
Reference in New Issue