Skip to content

Commit

Permalink
fix crash when hinstance isnt set
Browse files Browse the repository at this point in the history
  • Loading branch information
murl-digital committed Jun 13, 2024
1 parent b08a0d3 commit 275cb4c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/renderer/wgpu_renderer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ impl Renderer {
raw_window_handle::RawWindowHandle::Win32(handle) => {
let mut raw_handle = Win32WindowHandle::new(NonZeroIsize::new(handle.hwnd as isize).unwrap());

raw_handle.hinstance = handle.hinstance.is_null().then(|| { NonZeroIsize::new(handle.hinstance as isize).unwrap() });
raw_handle.hinstance = NonZeroIsize::new(handle.hinstance as isize);


raw_window_handle_06::RawWindowHandle::Win32(raw_handle)
Expand Down

0 comments on commit 275cb4c

Please # to comment.