Skip to content

Commit

Permalink
burner/win32/sel.cpp hDrvIcon, handle this better
Browse files Browse the repository at this point in the history
  • Loading branch information
dinkc64 committed Sep 10, 2023
1 parent 0630444 commit 5b3442c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/burner/win32/sel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ bool bIconsLoaded = 0;
bool bIconsOnlyParents = 1;
int nIconsXDiff;
int nIconsYDiff;
static HICON hDrvIcon[19999];
static HICON *hDrvIcon;
bool bGameInfoOpen = false;

// Dialog Sizing
Expand Down Expand Up @@ -1484,6 +1484,8 @@ void LoadDrvIcons()
{
TCHAR szIcon[MAX_PATH];

hDrvIcon = (HICON *)malloc((nBurnDrvCount + 256) * sizeof(HICON));

if(nIconsSize == ICON_16x16) {
nIconsSizeXY = 16;
nIconsYDiff = 4;
Expand Down Expand Up @@ -1647,6 +1649,8 @@ void UnloadDrvIcons() {
DestroyIcon(hDrvIcon[nDrvIndex]);
hDrvIcon[nDrvIndex] = NULL;
}

free(hDrvIcon);
}

#define UM_CHECKSTATECHANGE (WM_USER + 100)
Expand Down

0 comments on commit 5b3442c

Please sign in to comment.