diff --git a/internal/c/libqb.cpp b/internal/c/libqb.cpp index 3477c8699..71e31c56a 100644 --- a/internal/c/libqb.cpp +++ b/internal/c/libqb.cpp @@ -22342,7 +22342,6 @@ int32 func__printwidth(qbs* text, int32 screenhandle, int32 passed){ #ifdef DEPENDENCY_ICON void sub__icon(int32 handle_icon, int32 handle_window_icon, int32 passed){ - static HANDLE ExeIcon; if (new_error) return; @@ -22376,6 +22375,8 @@ int32 func__printwidth(qbs* text, int32 screenhandle, int32 passed){ #ifdef QB64_WINDOWS while (!window_handle){Sleep(100);} + static HANDLE ExeIcon; + //Attempt to load the first icon embedded in the .exe if (!ExeIcon) ExeIcon = LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(0), IMAGE_ICON,32, 32, 0);