Skip to content

Commit

Permalink
Merge pull request nannou-org#7 from mitchmindtree/master
Browse files Browse the repository at this point in the history
Fix bug where point rate change could panic
  • Loading branch information
mitchmindtree authored Apr 25, 2019
2 parents 8ec8c22 + 610dd4e commit 38181d3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "lasy"
version = "0.2.3"
version = "0.2.4"
authors = ["mitchmindtree <mitchell.nordine@gmail.com>"]
description = "A cross-platform laser DAC detection and streaming API."
edition = "2018"
Expand Down
2 changes: 1 addition & 1 deletion src/stream/raw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down

0 comments on commit 38181d3

Please sign in to comment.