Fixed a crash bug when creating new brushes.