diff options
| author | Vaxry <vaxry@vaxry.net> | 2025-01-23 21:27:11 +0000 |
|---|---|---|
| committer | Vaxry <vaxry@vaxry.net> | 2025-01-23 21:27:11 +0000 |
| commit | 1a0a22ad038bbd51c4e1514868d6dcd505af0242 (patch) | |
| tree | 0c8c2ecb00fd146910b9348735f387a3bcc56ff1 /src/config/ConfigManager.cpp | |
| parent | 0a1ae48a9fd6eb76baad27de98c00f653a55e4ac (diff) | |
configmgr: fix crash on very early plugin loads
Diffstat (limited to 'src/config/ConfigManager.cpp')
| -rw-r--r-- | src/config/ConfigManager.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index 08f0f33f..b0665db9 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -954,7 +954,8 @@ void CConfigManager::postConfigReload(const Hyprlang::CParseResult& result) { const auto PENABLEXWAYLAND = std::any_cast<Hyprlang::INT>(m_pConfig->getConfigValue("xwayland:enabled")); g_pCompositor->m_bWantsXwayland = PENABLEXWAYLAND; // enable/disable xwayland usage - if (!isFirstLaunch) { + if (!isFirstLaunch && + g_pXWayland /* XWayland has to be initialized by CCompositor::initManagers for this to make sense, and it doesn't have to be (e.g. very early plugin load) */) { bool prevEnabledXwayland = g_pXWayland->enabled(); if (g_pCompositor->m_bWantsXwayland != prevEnabledXwayland) g_pXWayland = makeUnique<CXWayland>(g_pCompositor->m_bWantsXwayland); |
