From b29e473c2190f9a9b84d8288b932a5164557b8dd Mon Sep 17 00:00:00 2001 From: berak Date: Wed, 1 Jul 2015 15:32:37 +0200 Subject: [PATCH] fix plausability check, #issue 4429 --- modules/ml/src/nbayes.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ml/src/nbayes.cpp b/modules/ml/src/nbayes.cpp index 5ca74acd91..221db93e24 100644 --- a/modules/ml/src/nbayes.cpp +++ b/modules/ml/src/nbayes.cpp @@ -313,7 +313,7 @@ public: CV_Error( CV_StsBadArg, "The input samples must be 32f matrix with the number of columns = nallvars" ); - if( samples.rows > 1 && _results.needed() ) + if( (samples.rows > 1) && (! _results.needed()) ) CV_Error( CV_StsNullPtr, "When the number of input samples is >1, the output vector of results must be passed" );