Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changes/single-instance-nullpointer-deref.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
single-instance: patch
---

Fixed an issue that caused `null pointer dereference occurred` errors on rust nightly.
2 changes: 1 addition & 1 deletion plugins/process/permissions/schemas/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -322,4 +322,4 @@
]
}
}
}
}
5 changes: 5 additions & 0 deletions plugins/single-instance/src/platform_impl/windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,11 @@ 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 {
Expand Down
Loading