summaryrefslogtreecommitdiff
path: root/rotord/src/cvimage.h
diff options
context:
space:
mode:
authorTim Redfern <tim@eclectronics.org>2014-02-03 13:47:05 +0000
committerTim Redfern <tim@eclectronics.org>2014-02-03 13:47:05 +0000
commit943bfa53cf5df0ecc9b04967a61be17c64e33e77 (patch)
tree4336d8ee0779fc91377574f27f6fbc869fc16321 /rotord/src/cvimage.h
parent086ac9c59ff0554ca34db17e51f3f9302a656b40 (diff)
bug chasing
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);