Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UPBGE: Fix mathutils callbacks registration.
The assertion in Mathutils_RegisterCallback was raised when all the callbacks were registered (freestyle and bmesh too). But this assertion introduced in 1b74ec9 is wrong. The test i + 1 < MAX suppose that the last callback is a null sentinel. But this is not the case as no one is using this to stop a loop and the loop in Mathutils_RegisterCallback must stop when it find a null slot or that the slot is already containing the callback, otherwise it's an error. It's impossible to stop the loop with all regular slots registered and and different from the one intenting to register. Fix a part of issue #785.
- Loading branch information