Fixes a crash caused by an invalid dereference when changing colors in editor