Skip to content
Snippets Groups Projects
Commit 1cbc21ad authored by Dorota Czaplejewicz's avatar Dorota Czaplejewicz
Browse files

variant: Fix double-free

gio::Settings::set_value takes over ownership of the Variant sometimes, but in other cases it doesn't. To prevent this being a problem, the custom Variant is made of the type that will never have its ownership taken.

This is not necessarily consistent with what gtk-rs authors intended.

In practice, the ownership is shared by refcounting, and after the Rust reference is dropped, one taken by Settings survives.
parent 11213ba1
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment