Skip to content

Commit

Permalink
fixes nullreference exceptions on routenodeinfo
Browse files Browse the repository at this point in the history
  • Loading branch information
runeanielsen committed Aug 20, 2020
1 parent a7d1546 commit 43b7964
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/OpenFTTH.GDBIntegrator.GeoDatabase/Postgres/Postgis.cs
Original file line number Diff line number Diff line change
Expand Up @@ -804,6 +804,7 @@ UPDATE route_network_integrator.route_segment

var mappedRouteSegment = new
{
mrid = routeSegment.Mrid,
coord = routeSegment.Coord,
workTaskMrId = routeSegment.WorkTaskMrid,
userName = routeSegment.Username,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ await PublishMarkedAsDeletedSegment(
private async Task<bool> IsDeleteable(RouteNode routeNode)
{
var intersectingRouteSegments = await _geoDatabase.GetIntersectingRouteSegments(routeNode);
return routeNode.RouteNodeInfo.Kind == null
&& String.IsNullOrEmpty(routeNode.NamingInfo.Name)
return routeNode.RouteNodeInfo?.Kind == null
&& String.IsNullOrEmpty(routeNode.NamingInfo?.Name)
&& intersectingRouteSegments.Count == 0;
}

Expand Down

0 comments on commit 43b7964

Please sign in to comment.