Skip to content

Commit 7963512

Browse files
committed
Fix crash in demo when dragging two out pins and dropping to show menu
1 parent 3cc29b1 commit 7963512

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

examples/demo.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -500,10 +500,10 @@ impl SnarlViewer<DemoNode> for DemoViewer {
500500

501501
match src_pins {
502502
AnyPins::Out(src_pins) => {
503-
assert!(
504-
src_pins.len() == 1,
505-
"There's no concept of multi-input nodes in this demo"
506-
);
503+
if src_pins.len() != 1 {
504+
ui.label("Multiple output pins are not supported in this demo");
505+
return;
506+
}
507507

508508
let src_pin = src_pins[0];
509509
let src_out_ty = pin_out_compat(snarl.get_node(src_pin.node).unwrap());

0 commit comments

Comments
 (0)