fix: prevent crash when copying version when no ingame

This commit is contained in:
George V. 2026-04-16 19:47:11 +03:00
parent 295c4cf358
commit bd6586e45b

View file

@ -2056,7 +2056,7 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance,
case 'B':
std::wstring version = std::wstring(VER_BRANCHVERSION_STR_W) + L"/" + std::wstring(VER_PRODUCTVERSION_STR_W);
Screen::setClipboard(version);
if (pMinecraft->gui)
if (pMinecraft->gui && app.GetGameStarted())
{
const int primaryPad = ProfileManager.GetPrimaryPad();
pMinecraft->gui->addMessage(L"Copied version to clipboard", primaryPad);