Skip to content

Commit

Permalink
BCMenu.cpp: Fix memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
sdottaka committed Jul 3, 2024
1 parent ba108a9 commit 6fa585f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Src/Common/BCMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,9 @@ void BCMenuData::SetWideString(const wchar_t *szWideString)
void BCMenu::DisableOwnerDraw()
{
m_bEnableOwnerDraw = false;
afxData.hbmMenuDot = reinterpret_cast<HBITMAP>(CreateRadioDotBitmap()->Detach());
CBitmap* pBitmap = CreateRadioDotBitmap();
afxData.hbmMenuDot = reinterpret_cast<HBITMAP>(pBitmap->Detach());
delete pBitmap;
}

bool BCMenu::IsMenu(HMENU submenu)
Expand Down

0 comments on commit 6fa585f

Please sign in to comment.