This is due to uninitialized `curve_strength` table. It is either
initialized for active tool or the eraser (if ctrl is held). So fix is
to choose correct brush in execute() function.
Also fix the inverted condition in begin() function to choose
eraser brush.
Pull Request: https://projects.blender.org/blender/blender/pulls/124975