mirror of
https://github.com/rustdesk/rustdesk.git
synced 2024-11-24 04:12:20 +08:00
fix android crash caused by outdated video frame ptr (#7996)
Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
parent
73662ed7d9
commit
c640f7ed12
@ -48,6 +48,8 @@ impl FrameRaw {
|
||||
|
||||
fn set_enable(&mut self, value: bool) {
|
||||
self.enable = value;
|
||||
self.ptr.store(std::ptr::null_mut(), SeqCst);
|
||||
self.len = 0;
|
||||
}
|
||||
|
||||
fn update(&mut self, data: *mut u8, len: usize) {
|
||||
@ -141,11 +143,7 @@ pub extern "system" fn Java_ffi_FFI_setFrameRawEnable(
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "system" fn Java_ffi_FFI_init(
|
||||
env: JNIEnv,
|
||||
_class: JClass,
|
||||
ctx: JObject,
|
||||
) {
|
||||
pub extern "system" fn Java_ffi_FFI_init(env: JNIEnv, _class: JClass, ctx: JObject) {
|
||||
log::debug!("MainService init from java");
|
||||
if let Ok(jvm) = env.get_java_vm() {
|
||||
*JVM.write().unwrap() = Some(jvm);
|
||||
|
Loading…
Reference in New Issue
Block a user