mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
stupid workaround for https://sciter.com/forums/topic/crash-on-latest-tis-mac-sdk-sometimes/
This commit is contained in:
12
src/ui.rs
12
src/ui.rs
@@ -22,6 +22,11 @@ use std::{
|
||||
|
||||
pub type Childs = Arc<Mutex<(bool, HashMap<(String, String), Child>)>>;
|
||||
|
||||
lazy_static::lazy_static! {
|
||||
// stupid workaround for https://sciter.com/forums/topic/crash-on-latest-tis-mac-sdk-sometimes/
|
||||
static ref STUPID_VALUES: Mutex<Vec<Arc<Vec<Value>>>> = Default::default();
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
struct UI(
|
||||
Childs,
|
||||
@@ -811,3 +816,10 @@ fn check_connect_status(
|
||||
std::thread::spawn(move || check_connect_status_(reconnect, cloned, cloned_options));
|
||||
(status, options)
|
||||
}
|
||||
|
||||
// sacrifice some memory
|
||||
pub fn value_crash_workaround(values: &[Value]) -> Arc<Vec<Value>> {
|
||||
let persist = Arc::new(values.to_vec());
|
||||
STUPID_VALUES.lock().unwrap().push(persist.clone());
|
||||
persist
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user