If you mat = null you will have null.diffuseTexture which is also would be just null if it has any sense…
You don’t change the material, you need to change only its properties.
Here your example works - https://www.babylonjs-playground.com/#0XC1MH#2
However, the texture was treated as null intentionally.
click the left rabbit to change the color, and then click the right rabbit to change the color, and the color of the two rabbits will still change at the same time.
For the sake of reusability we use the same vector when notifying of a value change. When you set this vector to be the color of one mesh, changing it again will set the other mesh’s color again.
Pinging @DarraghBurke to maybe find an elegant way to avoid reusing (for example with a flag?) though this is the expected behavior. Maybe documenting it will be enough