mirror of
https://github.com/opencv/opencv.git
synced 2024-11-29 22:00:25 +08:00
Merge pull request #3687 from Dmitry-Me:fixPossibleNullPtrDeref
This commit is contained in:
commit
5466e321b8
@ -107,10 +107,13 @@ public:
|
||||
|
||||
void deallocate(UMatData* u) const
|
||||
{
|
||||
if (!u)
|
||||
return;
|
||||
|
||||
CV_Assert(u->urefcount >= 0);
|
||||
CV_Assert(u->refcount >= 0);
|
||||
|
||||
if (u && u->refcount == 0)
|
||||
if (u->refcount == 0)
|
||||
{
|
||||
if ( !(u->flags & UMatData::USER_ALLOCATED) )
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user