Commit 70664ccf authored by catree's avatar catree
Browse files

Fix GMSMatcher crash when -1 value is assigned by getGridIndexLeft() in assignMatchPairs().

parent 9c0ae273
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -370,7 +370,7 @@ int GMSMatcher::run(const int rotationType)
        // Mark inliers
        for (size_t i = 0; i < mNumberMatches; i++)
        {
            if (mCellPairs[mvMatchPairs[i].first] == mvMatchPairs[i].second)
            if (mvMatchPairs[i].first >= 0 && mCellPairs[mvMatchPairs[i].first] == mvMatchPairs[i].second)
                mvbInlierMask[i] = true;
        }
    }