diff --git a/src/converter/registry.cpp b/src/converter/registry.cpp index aa20c3f68..432d55a77 100644 --- a/src/converter/registry.cpp +++ b/src/converter/registry.cpp @@ -85,10 +85,12 @@ BOOST_PYTHON_DECL PyObject* registration::to_python(void const volatile* source) throw_error_already_set(); } - - return source == 0 - ? incref(Py_None) - : this->m_to_python(const_cast(source)); + else + { + return source == 0 + ? incref(Py_None) + : this->m_to_python(const_cast(source)); + } } namespace @@ -96,7 +98,7 @@ namespace template< typename T > void delete_node( T* node ) { - if( !!node && !!node->next ) + if (node != 0) delete_node( node->next ); delete node; }