summaryrefslogtreecommitdiffstats
path: root/axiom/src/om
diff options
context:
space:
mode:
Diffstat (limited to 'axiom/src/om')
-rw-r--r--axiom/src/om/om_stax_builder.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/axiom/src/om/om_stax_builder.c b/axiom/src/om/om_stax_builder.c
index aca1878..052ce89 100644
--- a/axiom/src/om/om_stax_builder.c
+++ b/axiom/src/om/om_stax_builder.c
@@ -135,10 +135,13 @@ axiom_stax_builder_free_internal(
axiom_stax_builder_t * om_builder,
const axutil_env_t * env)
{
- axutil_hash_free(om_builder->declared_namespaces, env);
- axiom_xml_reader_free(om_builder->parser, env);
- axiom_document_free_self(om_builder->document, env);
- AXIS2_FREE(env->allocator, om_builder);
+ if(om_builder)
+ {
+ axutil_hash_free(om_builder->declared_namespaces, env);
+ axiom_xml_reader_free(om_builder->parser, env);
+ axiom_document_free_self(om_builder->document, env);
+ AXIS2_FREE(env->allocator, om_builder);
+ }
}
/**