mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-09 16:05:58 +01:00
Fix crash in CConfigManager::parseKeyword (#1983)
If debug:manual_crash is set on startup, parseKeyword tries to call g_pHyprNotificationOverlay->addNotification, but g_pHyprNotificationOverlay isn't initialized yet (is nullptr) This commit adds a sanity check for that.
This commit is contained in:
parent
5e2d4d644a
commit
07e4ba9d80
1 changed files with 4 additions and 2 deletions
|
@ -1164,8 +1164,10 @@ std::string CConfigManager::parseKeyword(const std::string& COMMAND, const std::
|
||||||
// manual crash
|
// manual crash
|
||||||
if (configValues["debug:manual_crash"].intValue && !m_bManualCrashInitiated) {
|
if (configValues["debug:manual_crash"].intValue && !m_bManualCrashInitiated) {
|
||||||
m_bManualCrashInitiated = true;
|
m_bManualCrashInitiated = true;
|
||||||
|
if (g_pHyprNotificationOverlay) {
|
||||||
g_pHyprNotificationOverlay->addNotification("Manual crash has been set up. Set debug:manual_crash back to 0 in order to crash the compositor.", CColor(0), 5000,
|
g_pHyprNotificationOverlay->addNotification("Manual crash has been set up. Set debug:manual_crash back to 0 in order to crash the compositor.", CColor(0), 5000,
|
||||||
ICON_INFO);
|
ICON_INFO);
|
||||||
|
}
|
||||||
} else if (m_bManualCrashInitiated && !configValues["debug:manual_crash"].intValue) {
|
} else if (m_bManualCrashInitiated && !configValues["debug:manual_crash"].intValue) {
|
||||||
// cowabunga it is
|
// cowabunga it is
|
||||||
g_pHyprRenderer->initiateManualCrash();
|
g_pHyprRenderer->initiateManualCrash();
|
||||||
|
|
Loading…
Reference in a new issue