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
This commit is contained in:
committed by
Jesse Yurkovich
parent
6428f2329e
commit
1db803516a
@@ -32,7 +32,7 @@ FileHandlerType *BKE_file_handler_find(const char *name)
|
||||
|
||||
void BKE_file_handler_add(std::unique_ptr<FileHandlerType> 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 = ';';
|
||||
|
||||
Reference in New Issue
Block a user