mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-08-18 07: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) {
|
||||
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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user