Skip to content

Commit

Permalink
Check for !bAllocated on assignment of ofxCvImage (fixes #6115) (#6116)
Browse files Browse the repository at this point in the history
#changelog #addons #opencv
  • Loading branch information
jean-louis authored and arturoc committed Mar 22, 2019
1 parent e6e4ee1 commit cfc7d2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/ofxOpenCv/src/ofxCvImage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ void ofxCvImage::operator = ( const IplImage* mom ) {
return;
}

if( mom->nChannels == cvImage->nChannels && mom->depth == cvImage->depth ){
if( !bAllocated || mom->nChannels == cvImage->nChannels && mom->depth == cvImage->depth ){
if( !bAllocated ){ //lets allocate if needed
allocate(mom->width, mom->height);
}else if( mom->width != width || mom->height != height ){
Expand Down

0 comments on commit cfc7d2d

Please sign in to comment.