fix(single-instance): Check if pointer is null for V1

This just adds the [fix](https://github.com/tauri-apps/plugins-workspace/pull/2452) that was merged into the V2 version of the plugin into the V1 version,
pull/2657/head
Jack Wills 3 months ago committed by GitHub
parent b360e3785e
commit 6b7c50a87e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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 {

Loading…
Cancel
Save