From 899ddb82556cfc591a1aa3dc31dbb6dcb96704f0 Mon Sep 17 00:00:00 2001 From: Ken Van Hoeylandt Date: Mon, 27 Jul 2026 00:41:52 +0200 Subject: [PATCH] Actually fix the issue --- TactilityKernel/source/device.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TactilityKernel/source/device.cpp b/TactilityKernel/source/device.cpp index be4ec2cc1..9de3a11e4 100644 --- a/TactilityKernel/source/device.cpp +++ b/TactilityKernel/source/device.cpp @@ -381,11 +381,11 @@ bool device_is_constructed(const Device* device) { error_t device_get(Device* device) { auto* internal = device->internal; - lock_internal(internal); - if (!internal->state.started || internal->state.stopping) { + if (!internal) { unlock_internal(internal); return ERROR_INVALID_STATE; } + lock_internal(internal); internal->ref_count++; unlock_internal(internal); return ERROR_NONE;