diff --git a/Code/Wrappers/QtWidget/otbWrapperQtWidgetFloatParameterFactory.cxx b/Code/Wrappers/QtWidget/otbWrapperQtWidgetFloatParameterFactory.cxx
index 902a82bc93648d8cae9783b3c86af22cd53727f9..9d2945d48f75495ffa2173e422120c242e847b66 100644
--- a/Code/Wrappers/QtWidget/otbWrapperQtWidgetFloatParameterFactory.cxx
+++ b/Code/Wrappers/QtWidget/otbWrapperQtWidgetFloatParameterFactory.cxx
@@ -38,7 +38,7 @@ QWidget * QtWidgetFloatParameterFactory::CreateQtWidget(Parameter * param)
   FloatParameter * floatParam = dynamic_cast<FloatParameter *>(param);
 
   // Check if dynamic cast succeeds
-  if(!param)
+  if(!floatParam)
     {
     return 0;
     }