Skip to content

Commit

Permalink
Merge pull request gtk-rs#677 from ids1024/new_variant
Browse files Browse the repository at this point in the history
fix: Do not transfer ownership in Variant::new_variant()
  • Loading branch information
sdroege authored Sep 4, 2020
2 parents 4516a75 + f9c500e commit a8b5db0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/variant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ impl Variant {
/// Boxes value.
#[inline]
pub fn new_variant(value: &Variant) -> Self {
unsafe { from_glib_full(glib_sys::g_variant_new_variant(value.to_glib_full())) }
unsafe { from_glib_none(glib_sys::g_variant_new_variant(value.to_glib_none().0)) }
}

/// Unboxes self.
Expand Down

0 comments on commit a8b5db0

Please sign in to comment.