Closed
Description
Given an exported property like this:
#[export(
getter = "get_building_pattern",
setter = "set_building_pattern",
variant_type = "::godot::sys::VariantType::Object"
)]
building_pattern: Option<Gd<TileMapPattern>>,
with a setter like this:
#[func]
pub fn set_building_pattern(&mut self, value: Variant) {
let converted: Result<Gd<TileMapPattern>, VariantConversionError> = value.try_to();
}
This will crash during try_to
because it creates a Gd with the null pointer inside it and then it calls ready
on it.
Metadata
Metadata
Assignees
Labels
No labels