diff --git a/examples/hello_world.rs b/examples/hello_world.rs index 759faea50664bc48945c5f566d60dceba749e24f..87cc694a572034eac121139c0e44e9ac769a1cce 100644 --- a/examples/hello_world.rs +++ b/examples/hello_world.rs @@ -17,6 +17,7 @@ fn startup( <TextWidgetBundle text={TextProps { content: "Hello World".into(), + size: 20.0, ..Default::default() }} /> diff --git a/src/context.rs b/src/context.rs index 4096dc8e22d74b402eb7ce45190f89dfc5ccac1c..85c4c85dedc42b96a25cae3336a67a1c92ac63d3 100644 --- a/src/context.rs +++ b/src/context.rs @@ -387,7 +387,9 @@ fn update_widgets_sys(world: &mut World) { let current = focus_tree.current(); focus_tree.clear(); if let Ok(tree) = context.tree.read() { - focus_tree.add(tree.root_node.unwrap(), &tree); + if let Some(root_node) = tree.root_node { + focus_tree.add(root_node, &tree); + } } current } else {