mirror of
https://github.com/harfbuzz/harfbuzz.git
synced 2025-04-15 01:18:13 +00:00
[wasm-rust] panic if buffer_set_contents fails
This commit is contained in:
parent
74a2f338c6
commit
e78d8653ce
1 changed files with 3 additions and 1 deletions
|
@ -304,7 +304,9 @@ impl<T: BufferItem> Drop for Buffer<T> {
|
|||
position: positions[..].as_mut_ptr(),
|
||||
};
|
||||
unsafe {
|
||||
buffer_set_contents(self._ptr, &c_contents);
|
||||
if !buffer_set_contents(self._ptr, &c_contents) {
|
||||
panic!("Couldn't set buffer contents");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue