summaryrefslogtreecommitdiff
path: root/cppu
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2013-03-05 21:20:25 +0100
committerStephan Bergmann <sbergman@redhat.com>2013-03-05 21:26:30 +0100
commitf4b218d16442f5daacf87b42e9cb1fb816bef4c0 (patch)
tree9bf77105e2d992003fafff979ef22f14a32b7f86 /cppu
parentef8a6be49a7175bcfdb014dca9c3d6ec2961b4b9 (diff)
*ppRet cannot become non-null there out of thin air
Change-Id: Idd08a89dd0dcf05caeacc9e14a0a6ea10b433588
Diffstat (limited to 'cppu')
-rw-r--r--cppu/source/typelib/typelib.cxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/cppu/source/typelib/typelib.cxx b/cppu/source/typelib/typelib.cxx
index 0c66661bef21..445f82434b9a 100644
--- a/cppu/source/typelib/typelib.cxx
+++ b/cppu/source/typelib/typelib.cxx
@@ -23,6 +23,7 @@
#endif
#include <boost/unordered_map.hpp>
+#include <cassert>
#include <list>
#include <set>
#include <vector>
@@ -250,6 +251,8 @@ inline void TypeDescriptor_Init_Impl::callChain(
typelib_TypeDescription ** ppRet, rtl_uString * pName )
SAL_THROW(())
{
+ assert(ppRet != 0);
+ assert(*ppRet == 0);
if (pCallbacks)
{
CallbackSet_Impl::const_iterator aIt = pCallbacks->begin();
@@ -262,11 +265,6 @@ inline void TypeDescriptor_Init_Impl::callChain(
++aIt;
}
}
- if (*ppRet)
- {
- typelib_typedescription_release( *ppRet );
- *ppRet = 0;
- }
}
//__________________________________________________________________________________________________