From a9919e01d0c857a568b6fa46fb3a878f6e6e83e1 Mon Sep 17 00:00:00 2001
From: Vladislav Vinogradov <vlad.vinogradov@itseez.com>
Date: Tue, 13 Nov 2012 17:54:17 +0400
Subject: [PATCH] fixed bug in gpu::HoughLines

---
 modules/gpu/src/cuda/hough.cu | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/gpu/src/cuda/hough.cu b/modules/gpu/src/cuda/hough.cu
index ac65b360a..ee4d02591 100644
--- a/modules/gpu/src/cuda/hough.cu
+++ b/modules/gpu/src/cuda/hough.cu
@@ -236,7 +236,7 @@ namespace cv { namespace gpu { namespace device
             const int r = blockIdx.x * blockDim.x + threadIdx.x;
             const int n = blockIdx.y * blockDim.y + threadIdx.y;
 
-            if (r >= accum.cols - 2 && n >= accum.rows - 2)
+            if (r >= accum.cols - 2 || n >= accum.rows - 2)
                 return;
 
             const int curVotes = accum(n + 1, r + 1);