summaryrefslogtreecommitdiff
path: root/sw/qa
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-04-15 11:24:49 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-04-15 11:24:49 +0200
commitcd0b935d5512f557ff03c4a5e783e4317c9fd04d (patch)
tree3f9238133e3e46594fb0e412c343a398657f0af6 /sw/qa
parent0c27d46498ca191487ae1eb7f24202dee3ef2af5 (diff)
Avoid undefined beahvior in test code
Change-Id: I721785a56c9adb2781c4afe14ed2a9e7254acab8
Diffstat (limited to 'sw/qa')
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index 0dbb72612fd2..a3853cf9278c 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -2912,6 +2912,8 @@ DECLARE_OOXMLEXPORT_TEST(testCitation,"FDO74775.docx")
if (!pXmlDoc)
return;
xmlNodeSetPtr pXmlNodes = getXPathNode(pXmlDoc,"/w:document/w:body/w:sdt/w:sdtContent/w:p[1]/w:r[3]/w:instrText");
+ CPPUNIT_ASSERT(pXmlNodes != 0);
+ CPPUNIT_ASSERT(pXmlNodes->nodeNr > 0);
xmlNodePtr pXmlNode = pXmlNodes->nodeTab[0];
OUString contents = OUString::createFromAscii((const char*)((pXmlNode->children[0]).content));
CPPUNIT_ASSERT(contents.match(" CITATION [Kra06]"));