diff --git a/src/bin/wireframe/main.rs b/src/bin/wireframe/main.rs index ab4d3f4..4be379a 100644 --- a/src/bin/wireframe/main.rs +++ b/src/bin/wireframe/main.rs @@ -30,11 +30,11 @@ impl DragCtl { pub fn on_button(&mut self, pos: Vec2, state: ElementState) { match state { ElementState::Pressed => { - assert!(self.ctl.is_none()); - self.ctl = Some((pos, self.state)); + if self.ctl.is_none() { + self.ctl = Some((pos, self.state)); + } } ElementState::Released => { - assert!(self.ctl.is_some()); self.ctl = None; } }