Fix linux build warning
authorAndrey Kamaev <andrey.kamaev@itseez.com>
Mon, 22 Oct 2012 14:19:32 +0000 (18:19 +0400)
committerAndrey Kamaev <andrey.kamaev@itseez.com>
Mon, 22 Oct 2012 14:38:22 +0000 (18:38 +0400)
modules/python/src2/cv2.cv.hpp

index 0207189..09d3c47 100644 (file)
@@ -3829,8 +3829,9 @@ static int zero = 0;
       coeff_usage = CV_VALUE; \
     else if ((length == alpha.count) && (alpha.count == beta.count) && (beta.count == gamma.count)) \
       coeff_usage = CV_ARRAY; \
-    else \
-      return (PyObject*)failmsg("SnakeImage weights invalid"); \
+    else { \
+        failmsg("SnakeImage weights invalid"); \
+        return (PyObject*)0; } \
     cvSnakeImage(image, points, length, a, b, g, coeff_usage, win, criteria, calc_gradient); \
   } while (0)