mirror of
https://github.com/hyprwm/hyprlock.git
synced 2025-05-12 21:30:37 +01:00
input-field: Fix crash when numlock is on and numlock_color is fallback (#673)
When numlock is enabled but numlock_color is fallback, `targetGrad` remains nullptr. This causes Hyprlock to crash in updateColors(). This commit aligns the condition check for assigning `targetGrad` with later usages.
This commit is contained in:
parent
c976b6a1d1
commit
465148ac21
1 changed files with 1 additions and 1 deletions
|
@ -418,7 +418,7 @@ void CPasswordInputField::updateColors() {
|
|||
CHyprColor innerTarget = colorConfig.inner;
|
||||
CHyprColor fontTarget = (displayFail) ? colorConfig.fail->m_vColors.front() : colorConfig.font;
|
||||
|
||||
if (checkWaiting || displayFail || g_pHyprlock->m_bCapsLock || NUMLOCK) {
|
||||
if (checkWaiting || displayFail || g_pHyprlock->m_bCapsLock || (NUMLOCK && !colorConfig.num->m_bIsFallback)) {
|
||||
if (BORDERLESS && colorConfig.swapFont) {
|
||||
fontTarget = targetGrad->m_vColors.front();
|
||||
} else if (BORDERLESS && !colorConfig.swapFont) {
|
||||
|
|
Loading…
Reference in a new issue