mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-16 06:38:03 +08:00
Fix the Imaginate node from crashing (#1512)
* Allow generic node input for type inference * Make imaginate resolution picking depend on the image resolution instead of the transform * Remove dead code * Fix console spam after crash * Fix crash when disconnecting Imaginate node input * Update Imaginate tool tooltip --------- Co-authored-by: Dennis Kobert <dennis@kobert.dev>
This commit is contained in:
@@ -447,7 +447,10 @@ impl NodeGraphExecutor {
|
||||
};
|
||||
let introspection_node = find_node(wrapped_network)?;
|
||||
let introspection = self.introspect_node(&[node_path, &[introspection_node]].concat())?;
|
||||
let downcasted: &T = <dyn std::any::Any>::downcast_ref(introspection.as_ref())?;
|
||||
let Some(downcasted): Option<&T> = <dyn std::any::Any>::downcast_ref(introspection.as_ref()) else {
|
||||
log::warn!("Failed to downcast type for introspection");
|
||||
return None;
|
||||
};
|
||||
Some(extract_data(downcasted))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user