summaryrefslogtreecommitdiff
path: root/rotord/src/cvimage.h
diff options
context:
space:
mode:
Diffstat (limited to 'rotord/src/cvimage.h')
-rw-r--r--rotord/src/cvimage.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/rotord/src/cvimage.h b/rotord/src/cvimage.h
index 25cf3e8..1210744 100644
--- a/rotord/src/cvimage.h
+++ b/rotord/src/cvimage.h
@@ -130,6 +130,10 @@ namespace Rotor {
return true;
};
bool setup(int _w,int _h){ //set up with internal data
+ if (_w==0||_h==0) {
+ std::cerr<<"Error! cvimage: request to set up image at "<<_w<<"x"<<_h<<std::endl;
+ return false;
+ }
if ((w!=_w)|(h!=_h)){
free();
rgb.create(_h,_w,CV_8UC3);