Skip to content

Commit

Permalink
On iOS add error handling for getRouteselector (#2394)
Browse files Browse the repository at this point in the history
  • Loading branch information
pascal-fischer authored Aug 6, 2024
1 parent 1802e51 commit 855fba8
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion client/ios/NetBirdSDK/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,14 @@ func (c *Client) GetRoutesSelectionDetails() (*RoutesSelectionDetails, error) {
}

routesMap := engine.GetClientRoutesWithNetID()
routeSelector := engine.GetRouteManager().GetRouteSelector()
routeManager := engine.GetRouteManager()
if routeManager == nil {
return nil, fmt.Errorf("could not get route manager")
}
routeSelector := routeManager.GetRouteSelector()
if routeSelector == nil {
return nil, fmt.Errorf("could not get route selector")
}

var routes []*selectRoute
for id, rt := range routesMap {
Expand Down

0 comments on commit 855fba8

Please sign in to comment.