diff --git a/src/wasm/rust/harfbuzz-wasm/src/lib.rs b/src/wasm/rust/harfbuzz-wasm/src/lib.rs index 61e9da9bf..c33479c59 100644 --- a/src/wasm/rust/harfbuzz-wasm/src/lib.rs +++ b/src/wasm/rust/harfbuzz-wasm/src/lib.rs @@ -304,7 +304,9 @@ impl Drop for Buffer { 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"); + } } } }