Skip to content

Commit 40daf89

Browse files
committed
Add safe checks for feature styling collection
1 parent 3bdeaa1 commit 40daf89

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

Assets/Editor/MapzenMapEditor.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,12 @@ private void LogWarnings()
141141
{
142142
foreach (var style in mapzenMap.FeatureStyling)
143143
{
144+
if (style == null)
145+
{
146+
Debug.LogWarning("'Null' style provided in feature styling collection");
147+
continue;
148+
}
149+
144150
if (style.FilterStyles.Count == 0)
145151
{
146152
Debug.LogWarning("The style " + style.name + " has no filter");

Assets/Mapzen/Unity/TileTask.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,10 @@ public void Start(List<FeatureStyle> featureStyling, SceneGroup root)
4444

4545
foreach (var style in featureStyling)
4646
{
47-
// TODO: group by style?
47+
if (style == null)
48+
{
49+
continue;
50+
}
4851

4952
foreach (var filterStyle in style.FilterStyles)
5053
{

0 commit comments

Comments
 (0)