In loop for https://github.com/Itseez/opencv/blob/master/modules/stitching/src/matchers.cpp#L679 I think upper limit should be std::min(num_images, i + 1+ range_width_) and not std::min(num_images, i + range_width_).
In current code if range_width_ is equal to 1 no featuresare push back and hence pairwise_matches is empty.