Skip to content

Commit

Permalink
Fix crash on windows (error code: 1410) when tray icon created again
Browse files Browse the repository at this point in the history
  • Loading branch information
felixmaker committed Mar 10, 2024
1 parent 4f8708a commit 09008fd
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/api/windows/funcs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,8 @@ pub(crate) unsafe fn init_window() -> Result<WindowInfo, TIError> {
let mut wnd = unsafe { mem::zeroed::<WNDCLASSW>() };
wnd.lpfnWndProc = Some(window_proc);
wnd.lpszClassName = class_name.as_ptr();
if RegisterClassW(&wnd) == 0 {
return Err(get_win_os_error("Error creating window class"));
}

RegisterClassW(&wnd);

let hwnd = CreateWindowExW(
0,
Expand Down

0 comments on commit 09008fd

Please sign in to comment.