-
-
Notifications
You must be signed in to change notification settings - Fork 244
Open
Labels
c: registerRegister classes, functions and other symbols to GDScriptRegister classes, functions and other symbols to GDScriptfeatureAdds functionality to the libraryAdds functionality to the library
Description
Maybe the inverse problem of #557.
#[derive(GodotClass)]
#[class(init, base=RefCounted)]
struct AccessGdOnDrop {
base: Base<RefCounted>,
}
impl Drop for AccessGdOnDrop {
fn drop(&mut self) {
// This causes a panic.
self.to_gd();
}
}
#[itest]
fn access_gd_on_drop() {
let obj = AccessGdOnDrop::new_gd();
drop(obj);
}
This gives a panic (message copied from my actual game, the above seems to outright abort):
ERROR: [panic .../godot-core-0.3.1/src/obj/raw_gd.rs:201]
object expected to inherit RefCounted
Metadata
Metadata
Assignees
Labels
c: registerRegister classes, functions and other symbols to GDScriptRegister classes, functions and other symbols to GDScriptfeatureAdds functionality to the libraryAdds functionality to the library