Commit aa113c5a authored by Vadim Pisarevsky's avatar Vadim Pisarevsky

Merge pull request #3787 from Dmitry-Me:fixNullPointerDereference2

parents f9b8ce1d d164d513
...@@ -205,9 +205,12 @@ public: ...@@ -205,9 +205,12 @@ public:
void deallocate(UMatData* u) const void deallocate(UMatData* u) const
{ {
if(!u)
return;
CV_Assert(u->urefcount >= 0); CV_Assert(u->urefcount >= 0);
CV_Assert(u->refcount >= 0); CV_Assert(u->refcount >= 0);
if(u && u->refcount == 0) if(u->refcount == 0)
{ {
if( !(u->flags & UMatData::USER_ALLOCATED) ) if( !(u->flags & UMatData::USER_ALLOCATED) )
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment