Skip to content

Commit

Permalink
Prevent memory corruption
Browse files Browse the repository at this point in the history
Probably not correct fix, but at least momory is not corrupted anymore. Need more time to understand the memory manipulations in QObject::new()
  • Loading branch information
vchekan committed May 3, 2017
1 parent 3316f54 commit 21f25e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ macro_rules! Q_OBJECT{
unsafe{
let mut local = $wrapper{
origin: Box::new(origin),
ptr: ::std::mem::uninitialized(),
ptr: ::std::mem::zeroed(),
properties: ::std::collections::HashMap::new(),
};
$(local.properties.insert(stringify!($propname), ($proptype::default().into(), $proptype::metatype()));)*
Expand Down

0 comments on commit 21f25e6

Please sign in to comment.