From eb0ff82425117bdd490b7666f790c255ce57b4c3 Mon Sep 17 00:00:00 2001 From: Maschell Date: Tue, 11 Oct 2022 13:19:33 +0200 Subject: [PATCH] Fix CRRemoveFSLayer return value --- src/export.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/export.cpp b/src/export.cpp index 1d5988e..c95432f 100644 --- a/src/export.cpp +++ b/src/export.cpp @@ -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; }