fix: sending invalid index to opencv

This commit is contained in:
Leon Scherer 2025-02-02 02:11:01 +01:00 committed by ColonelParrot
parent a447c90039
commit f0428d79ca

View File

@ -71,7 +71,10 @@
} }
} }
const maxContour = contours.get(maxContourIndex); const maxContour =
maxContourIndex >= 0 ?
contours.get(maxContourIndex) :
null;
imgGray.delete(); imgGray.delete();
imgBlur.delete(); imgBlur.delete();