mirror of
https://github.com/ColonelParrot/jscanify.git
synced 2025-12-30 22:31:52 +00:00
fix: sending invalid index to opencv
This commit is contained in:
parent
a447c90039
commit
f0428d79ca
@ -71,7 +71,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
const maxContour = contours.get(maxContourIndex);
|
||||
const maxContour =
|
||||
maxContourIndex >= 0 ?
|
||||
contours.get(maxContourIndex) :
|
||||
null;
|
||||
|
||||
imgGray.delete();
|
||||
imgBlur.delete();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user