Skip to content

Commit

Permalink
prevent ArcGIS crash on open (#3445)
Browse files Browse the repository at this point in the history
prevent ArcGIS crash on open (if project contained layers with non-existent data sources)
  • Loading branch information
KatKatKateryna authored May 29, 2024
1 parent 35183cf commit b2b3cdc
Showing 1 changed file with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,11 @@ private void SubscribeToFeatureLayerDataSourceChange(FeatureLayer layer)
return;
}
Table layerTable = layer.GetTable();
SubscribeToAnyDataSourceChange(layerTable);
SubscribedLayers.Add(layer);
if (layerTable != null)
{
SubscribeToAnyDataSourceChange(layerTable);
SubscribedLayers.Add(layer);
}
}

private void SubscribeToTableDataSourceChange(StandaloneTable table)
Expand All @@ -115,8 +118,11 @@ private void SubscribeToTableDataSourceChange(StandaloneTable table)
return;
}
Table layerTable = table.GetTable();
SubscribeToAnyDataSourceChange(layerTable);
SubscribedTables.Add(table);
if (layerTable != null)
{
SubscribeToAnyDataSourceChange(layerTable);
SubscribedTables.Add(table);
}
}

private void SubscribeToAnyDataSourceChange(Table layerTable)
Expand Down

0 comments on commit b2b3cdc

Please sign in to comment.