diff --git a/Cargo.toml b/Cargo.toml index a08593f05..3c370b6ae 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "lasy" -version = "0.2.3" +version = "0.2.4" authors = ["mitchmindtree "] description = "A cross-platform laser DAC detection and streaming API." edition = "2018" diff --git a/src/stream/raw.rs b/src/stream/raw.rs index 4f95e1001..b7214b8e8 100644 --- a/src/stream/raw.rs +++ b/src/stream/raw.rs @@ -499,7 +499,7 @@ where ether_dream_points.extend(buffer.iter().cloned().map(point_to_ether_dream_point)); // If the point rate changed, set the control value on the first point to trigger it. - if point_rate_changed { + if point_rate_changed && !ether_dream_points.is_empty() { ether_dream_points[0].control = ether_dream::dac::PointControl::CHANGE_RATE.bits(); }