From cd0b935d5512f557ff03c4a5e783e4317c9fd04d Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 15 Apr 2014 11:24:49 +0200 Subject: Avoid undefined beahvior in test code Change-Id: I721785a56c9adb2781c4afe14ed2a9e7254acab8 --- sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 2 ++ 1 file changed, 2 insertions(+) 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]")); -- cgit