* Make closestSegment() behave as expected by QgsGeometry::closestSegmentWithContext This fixes a bug that QgsPointLocator::nearestEdge() would return valid match even for point layers. * Shortcut if using QgsPointLocator with a wrong layer type