Skip to content

Commit a494d50

Browse files
authored
backend: fix use-after-free of logger during teardown (#244)
1 parent b2f6c1a commit a494d50

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/backend/Backend.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,9 @@ Hyprutils::Memory::CSharedPointer<CBackend> Aquamarine::CBackend::create(const s
110110
}
111111

112112
Aquamarine::CBackend::~CBackend() {
113-
;
113+
// Tear down implementations before the logger is destroyed,
114+
// as backends may log during teardown (e.g. SDRMConnector::disconnect).
115+
implementations.clear();
114116
}
115117

116118
bool Aquamarine::CBackend::start() {

0 commit comments

Comments
 (0)