mirror of
https://github.com/ruby-opencv/ruby-opencv
synced 2023-03-27 23:22:12 -04:00
fixed a bug (unexpected aborts of CvMat#to_CvMat)
This commit is contained in:
parent
a1331c9fdc
commit
7b378e7608
2 changed files with 11 additions and 4 deletions
|
@ -923,6 +923,10 @@ rb_square_q(VALUE self)
|
|||
VALUE
|
||||
rb_to_CvMat(VALUE self)
|
||||
{
|
||||
// CvMat#to_CvMat aborts when self's class is CvMat. (I don't know why...)
|
||||
if (CLASS_OF(self) == rb_klass)
|
||||
return self;
|
||||
|
||||
return DEPEND_OBJECT(rb_klass, cvGetMat(CVARR(self), RB_CVALLOC(CvMat)), self);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue