mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-04-21 11:26:15 +02:00
fix(single-instance): Check if pointer is null for V1 (#2657)
This commit is contained in:
@@ -113,6 +113,9 @@ unsafe extern "system" fn single_instance_window_proc<R: Runtime>(
|
||||
) -> LRESULT {
|
||||
let data_ptr = GetWindowLongPtrW(hwnd, GWL_USERDATA)
|
||||
as *mut (AppHandle<R>, Box<SingleInstanceCallback<R>>);
|
||||
if data_ptr.is_null() {
|
||||
return DefWindowProcW(hwnd, msg, wparam, lparam);
|
||||
}
|
||||
let (app_handle, callback) = &mut *data_ptr;
|
||||
|
||||
match msg {
|
||||
|
||||
Reference in New Issue
Block a user