Fix CRRemoveFSLayer return value

This commit is contained in:
Maschell 2022-10-11 13:19:33 +02:00
parent f5266db613
commit eb0ff82425
1 changed files with 1 additions and 1 deletions

View File

@ -131,7 +131,7 @@ ContentRedirectionApiErrorType CRAddFSLayer(CRLayerHandle *handle, const char *l
}
ContentRedirectionApiErrorType CRRemoveFSLayer(CRLayerHandle handle) {
if (remove_locked_first_if(fsLayerMutex, fsLayers, [handle](auto &cur) { return (CRLayerHandle) cur->getHandle() == handle; })) {
if (!remove_locked_first_if(fsLayerMutex, fsLayers, [handle](auto &cur) { return (CRLayerHandle) cur->getHandle() == handle; })) {
DEBUG_FUNCTION_LINE_WARN("CONTENT_REDIRECTION_API_ERROR_LAYER_NOT_FOUND for handle %08X", handle);
return CONTENT_REDIRECTION_API_ERROR_LAYER_NOT_FOUND;
}