Skip to content

Commit

Permalink
fix: bad optional access
Browse files Browse the repository at this point in the history
  • Loading branch information
c-dilks committed Sep 24, 2024
1 parent b533797 commit 284878c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/iguana/tests/include/TestMultithreading.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ inline int TestMultithreading(
event.read(bank);

// occasionally vary the run number (if the user wants to)
banks[run_config_bank_idx.value()].putInt("run", 0, std::rand() % 3000);
if(run_config_bank_idx.has_value())
banks[run_config_bank_idx.value()].putInt("run", 0, std::rand() % 3000);
// if(vary_run && run_config_bank_idx.has_value()) {
// if(std::rand() % 10 == 0) {
// auto runnum = banks[run_config_bank_idx.value()].getInt("run", 0);
Expand Down

0 comments on commit 284878c

Please sign in to comment.