Skip to content

Commit 6ec120d

Browse files
Dami-starwineee
authored andcommitted
fix: crash on startup due to uninitialized m_config pointer
The m_config member variable contained garbage value instead of nullptr because C++ doesn't auto-initialize pointer members. This caused invalid memory access and crash during startup. Initialize m_config to nullptr to ensure proper initial state.
1 parent 03094c5 commit 6ec120d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/seat/helper.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ private Q_SLOTS:
302302
void updateIdleInhibitor();
303303

304304
static Helper *m_instance;
305-
TreelandConfig *m_config;
305+
TreelandConfig *m_config = nullptr;
306306

307307
CurrentMode m_currentMode{ CurrentMode::Normal };
308308

0 commit comments

Comments
 (0)