File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -213,15 +213,17 @@ impl Info {
213213 assert_eq ! ( false , ptr. is_null( ) ) ;
214214 // Note, yes, this should be weak; the ‘free’ function for a format info object free’s its
215215 // own proplist!
216- unsafe { Self { ptr : ptr, properties : Proplist :: from_raw_weak ( ( * ptr) . list ) , weak : false } }
216+ let pl = Proplist :: from_raw_weak ( unsafe { ( * ptr) . list } ) ;
217+ Self { ptr : ptr, properties : pl, weak : false }
217218 }
218219
219220 /// Creates a new `Info` from an existing [`InfoInternal`] pointer.
220221 ///
221222 /// This is the ‘weak’ version, which avoids destroying the internal object when dropped.
222223 pub ( crate ) fn from_raw_weak ( ptr : * mut InfoInternal ) -> Self {
223224 assert_eq ! ( false , ptr. is_null( ) ) ;
224- unsafe { Self { ptr : ptr, properties : Proplist :: from_raw_weak ( ( * ptr) . list ) , weak : true } }
225+ let pl = Proplist :: from_raw_weak ( unsafe { ( * ptr) . list } ) ;
226+ Self { ptr : ptr, properties : pl, weak : true }
225227 }
226228
227229 /// Returns a new `Info` struct representing the same format.
You can’t perform that action at this time.
0 commit comments