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.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/rotord/src/cvimage.h b/rotord/src/cvimage.h
index 1210744..bc9c13d 100644
--- a/rotord/src/cvimage.h
+++ b/rotord/src/cvimage.h
@@ -130,7 +130,8 @@ namespace Rotor {
return true;
};
bool setup(int _w,int _h){ //set up with internal data
- if (_w==0||_h==0) {
+ if (_w==0||_h==0||(_w*_h*3)>10000000) {
+ //some kind of elusive thing that shows up only in non debug builds
std::cerr<<"Error! cvimage: request to set up image at "<<_w<<"x"<<_h<<std::endl;
return false;
}