fix: add null check for g_IPCSocket in onRepeatTimer#368
Merged
vaxerski merged 1 commit intoMay 25, 2026
Merged
Conversation
CWallpaperTarget::onRepeatTimer() calls IPC::g_IPCSocket->onWallpaperChanged() without checking if g_IPCSocket is valid. When IPC is disabled (ipc=0) or not initialized, g_IPCSocket is nullptr, causing a SIGSEGV. Stack trace from coredump: #0 __normal_iterator constructor (this->m_statusObjects at 0x60) hyprwm#1 IPC::CSocket::onWallpaperChanged (this=0x0) hyprwm#2 CWallpaperTarget::onRepeatTimer GDB confirms this=0x0 in onWallpaperChanged, meaning g_IPCSocket.get() returned nullptr when dereferenced. Fix: add a null guard matching the pattern already used in registerOutput() and elsewhere in the codebase.
vaxerski
approved these changes
May 23, 2026
Member
|
@fufexan what |
Member
|
I have no clue. We don't even use an access token so I have no idea why it would fail. |
Member
|
fix pls? |
Member
|
enjoy |
Member
|
tnx |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes a SIGSEGV crash when IPC is disabled (
ipc = 0in config) and wallpaper rotation is active.Root Cause
CWallpaperTarget::onRepeatTimer()callsIPC::g_IPCSocket->onWallpaperChanged()without checking ifg_IPCSocketis valid. When IPC is disabled or not initialized,g_IPCSocketisnullptr, causing a null pointer dereference.Crash Analysis (coredump)
GDB confirmed
this=0x0inonWallpaperChanged—g_IPCSocket.get()returnednullptr.Since
CSocket::m_statusObjectsis at offset0x60, accessingthis->m_statusObjectswhenthis=0x0resolves to address0x60, which is unmapped → SIGSEGV.Fix
Add a null guard matching the pattern already used in
registerOutput()and elsewhere:Note
IPC and wallpaper display are independent — wallpapers work fine without IPC. The crash only affects users who have wallpaper rotation configured while IPC is disabled.