Skip to content

Commit

Permalink
configmgr: fix crash on very early plugin loads
Browse files Browse the repository at this point in the history
  • Loading branch information
vaxerski committed Jan 23, 2025
1 parent 0a1ae48 commit 1a0a22a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/config/ConfigManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 1a0a22a

Please sign in to comment.