Skip to content

Commit 4927ecb

Browse files
committed
Add checker to see if its found
1 parent 58c1b21 commit 4927ecb

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/win/WinTray.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ void InitTrayIcon(HWND hwnd) {
1414
nid.uCallbackMessage = WM_USER + 1;
1515

1616
// Load a custom icon from resource (IDI_MYICON)
17-
nid.hIcon = LoadIcon(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_APP_ICON));
17+
HICON h = LoadIcon(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_APP_ICON));
18+
if (!h) {
19+
MessageBox(NULL, "Failed to load icon", "Debug", MB_OK);
20+
}
1821
strcpy_s(nid.szTip, "Split Loaf - Idle");
1922

2023
Shell_NotifyIcon(NIM_ADD, &nid);

0 commit comments

Comments
 (0)