mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-08-20 08:55:06 +00:00
Actually fix the issue
This commit is contained in:
parent
7e97de36cd
commit
899ddb8255
@ -381,11 +381,11 @@ bool device_is_constructed(const Device* device) {
|
|||||||
|
|
||||||
error_t device_get(Device* device) {
|
error_t device_get(Device* device) {
|
||||||
auto* internal = device->internal;
|
auto* internal = device->internal;
|
||||||
lock_internal(internal);
|
if (!internal) {
|
||||||
if (!internal->state.started || internal->state.stopping) {
|
|
||||||
unlock_internal(internal);
|
unlock_internal(internal);
|
||||||
return ERROR_INVALID_STATE;
|
return ERROR_INVALID_STATE;
|
||||||
}
|
}
|
||||||
|
lock_internal(internal);
|
||||||
internal->ref_count++;
|
internal->ref_count++;
|
||||||
unlock_internal(internal);
|
unlock_internal(internal);
|
||||||
return ERROR_NONE;
|
return ERROR_NONE;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user