Fix Python error when the profile is outside of layer bounds
Merge pull request #1 from wonder-sk/fix_selection_outside_bbox

Fix Python error when the profile is outside of layer bounds