Skip to content

Commit 702e2dd

Browse files
committed
Null pointer check needed as of rust 1.86
See tauri-apps/plugins-workspace#2452
1 parent d70289d commit 702e2dd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/windows_single.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,11 @@ unsafe extern "system" fn single_instance_window_proc(
9595
lparam: LPARAM,
9696
) -> LRESULT {
9797
let data_ptr = GetWindowLongPtrW(hwnd, GWL_USERDATA) as *mut Box<SingleInstanceCallback>;
98+
99+
if data_ptr.is_null() {
100+
return DefWindowProcW(hwnd, msg, wparam, lparam);
101+
}
102+
98103
let callback = &mut *data_ptr;
99104

100105
match msg {

0 commit comments

Comments
 (0)