Skip to content

Commit

Permalink
* Fix guild lister recursion crash
Browse files Browse the repository at this point in the history
  • Loading branch information
iProgramMC committed Feb 1, 2025
1 parent 72179ed commit 960b32d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/windows/GuildLister.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ LRESULT CALLBACK GuildLister::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
}
case WM_DESTROY:
{
DestroyWindow(pThis->m_scrollable_hwnd);
//DestroyWindow(pThis->m_scrollable_hwnd);
DestroyWindow(pThis->m_tooltip_hwnd);
DestroyWindow(pThis->m_more_btn_hwnd);
DestroyWindow(pThis->m_bar_btn_hwnd);
Expand Down
1 change: 0 additions & 1 deletion src/windows/ShellNotification.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ ShellNotification* GetShellNotification() {

ShellNotification::~ShellNotification()
{
assert(!m_bInitialized);
Deinitialize();
}

Expand Down
19 changes: 12 additions & 7 deletions src/windows/WinUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1299,6 +1299,17 @@ HBITMAP ResizeWithBackgroundColor(HDC hdc, HBITMAP hBitmap, HBRUSH backgroundCol
return newBitmap;
}

#ifdef _MSC_VER
#define UsedCompiler "MSVC"
#else
#define UsedCompiler "MinGW"
#endif
#ifdef UNICODE
#define ActiveCharset "Unicode"
#else
#define ActiveCharset "ANSI"
#endif

// This function calls std::terminate() after showing a message box.
extern "C" void Terminate(const char* message, ...)
{
Expand All @@ -1313,13 +1324,7 @@ extern "C" void Terminate(const char* message, ...)
anotherBuffer,
sizeof anotherBuffer,
"A fatal error has occurred within Discord Messenger. Please report it to iProgramInCpp!\r\n"
"You are using the "
#ifdef _MSC_VER
"MSVC"
#else
"MinGW"
#endif
" version.\r\n\r\n"
"You are using the " UsedCompiler "-" ActiveCharset " version.\r\n\r\n"
"Details about the error:\r\n\r\n"
"%s\r\n\r\n"
"Discord Messenger will now close.",
Expand Down

0 comments on commit 960b32d

Please sign in to comment.