Skip to content
Browse files

Ignore mtasa:// message loop messages until main menu

Solves crash offset 0007f6f0.

See also commit c315480 if you are interested where WM_COPYDATA comes from.

We might store the connection information given, but the player probably already started his MTA client with some command line arguments to connect to that server and somehow keeps spamming/clicking that mtasa://-URL anyway.
  • Loading branch information...
botder committed Oct 7, 2019
1 parent 08e7f04 commit 2111ab9bc1ffc03706c099e0864d0046346a5c1f
Showing with 8 additions and 2 deletions.
  1. +1 −0 Client/core/CCore.h
  2. +7 −2 Client/core/CMessageLoopHook.cpp
@@ -275,6 +275,7 @@ class CCore : public CCoreInterface, public CSingleton<CCore>
bool IsFakeLagCommandEnabled() { return m_bFakeLagCommandEnabled; }
SString GetBlueCopyrightString();
HANDLE SetThreadHardwareBreakPoint(HANDLE hThread, HWBRK_TYPE Type, HWBRK_SIZE Size, DWORD dwAddress);
bool IsFirstFrame() const noexcept { return m_bFirstFrame; }

void ApplyCoreInitSettings();
@@ -174,8 +174,13 @@ LRESULT CALLBACK CMessageLoopHook::ProcessMessage(HWND hwnd, UINT uMsg, WPARAM w

if (pCDS->dwData == URI_CONNECT)
LPSTR szConnectInfo = (LPSTR)pCDS->lpData;
// We can receive this message before we are ready to process it (e.g. trying to show a CEGUI message window before CEGUI is initialized).
// Ignore these messages until we are in the main menu (when CCore sets m_bFirstFrame to false)
if (!g_pCore->IsFirstFrame())
LPSTR szConnectInfo = (LPSTR)pCDS->lpData;

0 comments on commit 2111ab9

Please sign in to comment.
You can’t perform that action at this time.