Accessing material.color removes the material...

I have a single normal Diffuse material on an object. Getting or setting the color on this material at runtime causes the material to no longer be assigned to the Mesh Renderer component… what am I missing?

Color defaultColor = renderer.material.color;

or

renderer.material.color = new Color(1f, 1f, 1f);

The answer is renderer.sharedMaterial:

Unity - Manual: Draw call batching (Materials section)

Got to love sneaky quirks!