Check resolution.height() also instead of checking resolution.width() twice
authorMohammed Sameer <msameer@foolab.org>
Sun, 26 Aug 2012 23:02:36 +0000 (02:02 +0300)
committerMohammed Sameer <msameer@foolab.org>
Thu, 6 Sep 2012 16:10:09 +0000 (19:10 +0300)
lib/qtcammode.cpp

index e21a6b1..4dc2b11 100644 (file)
@@ -164,7 +164,7 @@ void QtCamMode::setCaps(const char *property, const QSize& resolution,
     return;
   }
 
-  if (resolution.width() <= 0 || resolution.width() <= 0) {
+  if (resolution.width() <= 0 || resolution.height() <= 0) {
     return;
   }