mirror of
https://github.com/pjh456/OxideJS.git
synced 2026-10-23 18:21:13 +08:00
fix: 修复异常 Shape 未校验问题
This commit is contained in:
@@ -47,6 +47,9 @@ impl ShapeForge {
|
||||
}
|
||||
|
||||
fn compute_depth(shape_id: ShapeId, shapes: &[Option<Arc<Shape>>]) -> u32 {
|
||||
if shape_id == 0 {
|
||||
return 0;
|
||||
}
|
||||
let mut count = 0u32;
|
||||
let mut cursor = Some(shape_id);
|
||||
while let Some(id) = cursor {
|
||||
|
||||
Reference in New Issue
Block a user