iter = eldbus_message_iter_get(ret);
+ if (start == root)
+ {
+ start = NULL;
+ }
Eo *accessible = _calculate_neighbor(bridge, root, start, direction == 1, search_mode);
_bridge_iter_object_reference_append(bridge, iter, accessible);
_bridge_object_register(bridge, accessible);
// that when we begin at start node and we navigate backward, then all children
// are visited, so navigation will ignore start's children and go to
// previous sibling available.
- unsigned char all_children_visited = (search_mode != NEIGHBOR_SEARCH_MODE_RECURSE_FROM_ROOT && !forward);
+ unsigned char all_children_visited = start && (search_mode != NEIGHBOR_SEARCH_MODE_RECURSE_FROM_ROOT && !forward);
// true, if starting element should be ignored. this is only used in rare case of
// recursive search failing to find an object.