mirror of
https://github.com/opencv/opencv.git
synced 2024-11-24 19:20:28 +08:00
fix for #2901 (en exception was raised when getting empty MatOfDMatch)
This commit is contained in:
parent
09fe5cddf1
commit
4c31c26acf
@ -16,8 +16,8 @@ public class MatOfDMatch extends Mat {
|
||||
|
||||
protected MatOfDMatch(long addr) {
|
||||
super(addr);
|
||||
if(checkVector(_channels, _depth) < 0 )
|
||||
throw new IllegalArgumentException("Incomatible Mat");
|
||||
if( !empty() && checkVector(_channels, _depth) < 0 )
|
||||
throw new IllegalArgumentException("Incomatible Mat: " + toString());
|
||||
//FIXME: do we need release() here?
|
||||
}
|
||||
|
||||
@ -27,8 +27,8 @@ public class MatOfDMatch extends Mat {
|
||||
|
||||
public MatOfDMatch(Mat m) {
|
||||
super(m, Range.all());
|
||||
if(checkVector(_channels, _depth) < 0 )
|
||||
throw new IllegalArgumentException("Incomatible Mat");
|
||||
if( !empty() && checkVector(_channels, _depth) < 0 )
|
||||
throw new IllegalArgumentException("Incomatible Mat: " + toString());
|
||||
//FIXME: do we need release() here?
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user