Skip to content

Commit deeb12d

Browse files
committed
Add import->export direct connection guard
1 parent 956eefa commit deeb12d

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

editor/src/messages/portfolio/document/utility_types/network_interface.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3860,6 +3860,11 @@ impl NodeNetworkInterface {
38603860
/// or per-node cache invalidation. Call `load_structure`, `unload_all_nodes_click_targets`, and
38613861
/// `unload_all_nodes_bounding_box` once after all import wiring is complete.
38623862
pub fn set_input_for_import(&mut self, input_connector: &InputConnector, new_input: NodeInput, network_path: &[NodeId]) {
3863+
if matches!(input_connector, InputConnector::Export(_)) && matches!(new_input, NodeInput::Import { .. }) {
3864+
log::error!("Cannot connect a network to an export, see https://github.com/GraphiteEditor/Graphite/issues/1762");
3865+
return;
3866+
}
3867+
38633868
let Some(network) = self.network_mut(network_path) else {
38643869
log::error!("Could not get nested network in set_input_for_import");
38653870
return;

0 commit comments

Comments
 (0)