Skip to content

Commit

Permalink
Merge #59
Browse files Browse the repository at this point in the history
59: Fix the zombie error of shader compilation r=grovesNL a=kvark

What I think is happening is that the library object keeps a reference to the error, so we shouldn't release it if the library is created.

Co-authored-by: Dzmitry Malyshau <[email protected]>
  • Loading branch information
bors[bot] and kvark committed Jun 30, 2018
2 parents e0c7933 + 6e8e383 commit 721def6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,8 @@ impl DeviceRef {
let desc: *mut Object = msg_send![err, localizedDescription];
let compile_error: *const libc::c_char = msg_send![desc, UTF8String];
let message = CStr::from_ptr(compile_error).to_string_lossy().into_owned();
msg_send![err, release];
if library.is_null() {
msg_send![err, release];
return Err(message);
} else {
warn!("Shader warnings: {}", message);
Expand Down

0 comments on commit 721def6

Please sign in to comment.