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

pull/2653/head
Jack Wills 1 month ago committed by GitHub
parent b360e3785e
commit 0fdb85df8a
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