From: Leonardo Florez-Valencia Date: Wed, 29 Apr 2015 23:13:32 +0000 (-0500) Subject: Minor modif X-Git-Tag: v0.1~400 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=d4dc1570eeb643571de66fa4be5b09b37e90c8cc;p=cpPlugins.git Minor modif --- diff --git a/lib/cpPlugins/Extensions/Algorithms/IterativeGaussianModelEstimator.hxx b/lib/cpPlugins/Extensions/Algorithms/IterativeGaussianModelEstimator.hxx index a8006a0..b0d0505 100644 --- a/lib/cpPlugins/Extensions/Algorithms/IterativeGaussianModelEstimator.hxx +++ b/lib/cpPlugins/Extensions/Algorithms/IterativeGaussianModelEstimator.hxx @@ -233,10 +233,14 @@ AddSample( const S& s_x, const S& s_y, ... ) std::va_list args_lst; va_start( args_lst, s_y ); sample[ 0 ] = s_x; - sample[ 1 ] = s_y; - for( unsigned int d = 2; d < D; ++d ) - sample[ d ] = S( va_arg( args_lst, double ) ); - va_end( args_lst ); + if( D > 1 ) + { + sample[ 1 ] = s_y; + for( unsigned int d = 2; d < D; ++d ) + sample[ d ] = S( va_arg( args_lst, double ) ); + va_end( args_lst ); + + } // fi this->AddSample( sample ); }