wayland.shell: fix memory corruption in wl_shell

Invalid data was set as user data for wl_shell_surface, causing
access to invalid memory at drop time.

Fixes #60
This commit is contained in:
Victor Berger 2018-01-14 12:12:29 +01:00 committed by Victor Berger
parent 05418c118f
commit f2751c824f
1 changed files with 1 additions and 1 deletions

View File

@ -84,7 +84,7 @@ where
return;
}
shell_surface
.set_user_data(Box::into_raw(Box::new(unsafe { surface.clone_unchecked() })) as *mut _);
.set_user_data(Box::into_raw(Box::new(unsafe { (surface.clone_unchecked(), shell.clone_unchecked()) })) as *mut _);
evlh.register(
&shell_surface,
shell_surface_implementation(),