diff --git a/unoxml/source/dom/element.cxx b/unoxml/source/dom/element.cxx index fa4ef9ce467083390a95eeb7d4c2e325fb551eee..f7cae19fdbdcff8fb5aca4e81b9f731c99d6eae6 100644 --- a/unoxml/source/dom/element.cxx +++ b/unoxml/source/dom/element.cxx @@ -132,7 +132,7 @@ namespace DOM RTL_TEXTENCODING_UTF8)); } - const xmlChar* pPrefix = m_aNodePtr->ns ? m_aNodePtr->ns->prefix : reinterpret_cast(""); + const xmlChar* pPrefix = (m_aNodePtr->ns && m_aNodePtr->ns->prefix) ? m_aNodePtr->ns->prefix : reinterpret_cast(""); const xmlChar* pName = m_aNodePtr->name; sal_Int32 nElementToken=FastToken::DONTKNOW; if( strlen(reinterpret_cast(pPrefix)) )