mirror of
https://github.com/penpot/penpot.git
synced 2025-05-14 02:26:37 +02:00
🐛 Fix WebGL warning when switching pages
This commit is contained in:
parent
12ec3b4942
commit
2f80d337ad
3 changed files with 15 additions and 8 deletions
|
@ -15,8 +15,10 @@ pub extern "C" fn alloc_bytes(len: usize) -> *mut u8 {
|
|||
}
|
||||
|
||||
pub fn free_bytes() {
|
||||
let buffer = unsafe { BUFFERU8.take() }.expect("uninitialized buffer");
|
||||
std::mem::drop(buffer);
|
||||
if unsafe { BUFFERU8.is_some() } {
|
||||
let buffer = unsafe { BUFFERU8.take() }.expect("uninitialized buffer");
|
||||
std::mem::drop(buffer);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn buffer_ptr() -> *mut u8 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue