Fixed potential crash bug with icon rendering