From 1db803516abc4958712971e174cda510f9ed7683 Mon Sep 17 00:00:00 2001 From: Jesse Yurkovich Date: Tue, 12 Dec 2023 09:43:28 +0100 Subject: [PATCH] Fix: Debug assert in file_handler_test The debug assert condition was inverted. It is expected that we do not find a `FileHandlerType` with the given `idname` during add. Like Operators being added twice from c code, this will now assert if one is actually found. Python duplicates are handled through `register_class` already. Pull Request: https://projects.blender.org/blender/blender/pulls/116084 --- source/blender/blenkernel/intern/file_handler.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/blenkernel/intern/file_handler.cc b/source/blender/blenkernel/intern/file_handler.cc index 5416f01b8c3..a082a11bdef 100644 --- a/source/blender/blenkernel/intern/file_handler.cc +++ b/source/blender/blenkernel/intern/file_handler.cc @@ -32,7 +32,7 @@ FileHandlerType *BKE_file_handler_find(const char *name) void BKE_file_handler_add(std::unique_ptr file_handler) { - BLI_assert(BKE_file_handler_find(file_handler->idname) != nullptr); + BLI_assert(BKE_file_handler_find(file_handler->idname) == nullptr); /** Load all extensions from the string list into the list. */ const char char_separator = ';';