# Revision history [back]

vector<DMatch>* matches never gets initialized, that's your problem here.

so matches->push_back(_m) will crash, as well as all further usage of matches

well, you could initialize it properly:

vector<DMatch>* matches = new vector<DMatch>;


but, why a pointer in the first place ?

i'd use vector<DMatch> matches , matches.push_back(_m) , and matches.size() instead