mirror of
https://github.com/penpot/penpot.git
synced 2025-05-17 20:16:11 +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
|
@ -40,6 +40,12 @@ pub extern "C" fn init(width: i32, height: i32) {
|
|||
}
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn clean_up() {
|
||||
unsafe { STATE = None }
|
||||
mem::free_bytes();
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn set_render_options(debug: u32, dpr: f32) {
|
||||
let state = unsafe { STATE.as_mut() }.expect("got an invalid state pointer");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue