Fixed segfault in debug mode caused by previous commit

This commit is contained in:
Matt Hill
2014-04-08 12:28:58 -05:00
parent cd585de155
commit 71bcf6169b

View File

@@ -49,7 +49,7 @@ CharacterSegmenter::CharacterSegmenter(Mat img, bool invertedColors, Config* con
displayImage(config, "CharacterSegmenter Thresholds", drawImageDashboard(charAnalysis->thresholds, CV_8U, 3));
}
if (this->config->debugCharSegmenter)
if (this->config->debugCharSegmenter && charAnalysis->linePolygon.size() > 0)
{
Mat img_contours(charAnalysis->bestThreshold.size(), CV_8U);
charAnalysis->bestThreshold.copyTo(img_contours);