[wasm-rust] panic if buffer_set_contents fails
This commit is contained in:
parent
74a2f338c6
commit
e78d8653ce
|
@ -304,7 +304,9 @@ impl<T: BufferItem> Drop for Buffer<T> {
|
||||||
position: positions[..].as_mut_ptr(),
|
position: positions[..].as_mut_ptr(),
|
||||||
};
|
};
|
||||||
unsafe {
|
unsafe {
|
||||||
buffer_set_contents(self._ptr, &c_contents);
|
if !buffer_set_contents(self._ptr, &c_contents) {
|
||||||
|
panic!("Couldn't set buffer contents");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue