diff options
| author | Vaxry <vaxry@vaxry.net> | 2024-05-04 16:37:26 +0100 |
|---|---|---|
| committer | Vaxry <vaxry@vaxry.net> | 2024-05-04 16:37:26 +0100 |
| commit | c77b60c91073471c0910c40b4df2baa08e01fa9b (patch) | |
| tree | 511fcbd9c20863c30a50a9a8a413afcd7cbd6ade /src/devices/Keyboard.cpp | |
| parent | c951c4f8a1bf02e03c7efbe9a8887c1657ef95d3 (diff) | |
keyboard: prevent UAF in destroy events
Diffstat (limited to 'src/devices/Keyboard.cpp')
| -rw-r--r-- | src/devices/Keyboard.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/devices/Keyboard.cpp b/src/devices/Keyboard.cpp index 11257a74..17357edb 100644 --- a/src/devices/Keyboard.cpp +++ b/src/devices/Keyboard.cpp @@ -23,9 +23,9 @@ CKeyboard::CKeyboard(wlr_keyboard* keeb) : keyboard(keeb) { // clang-format off hyprListener_destroy.initCallback(&keeb->base.events.destroy, [this] (void* owner, void* data) { - events.destroy.emit(); disconnectCallbacks(); keyboard = nullptr; + events.destroy.emit(); }, this, "CKeyboard"); hyprListener_key.initCallback(&keeb->events.key, [this] (void* owner, void* data) { |
