diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2011-11-11 02:19:11 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2011-11-11 03:04:51 +0100 |
commit | 6be5fda2e1af48ba3b994164184d4fcb9091b13b (patch) | |
tree | 13be357d36363e288037a8b4a154e056d218bf98 /sd/qa | |
parent | 6cc21742c5fa7ce20dc4cadd59f9946cff155045 (diff) |
close file before the first assertion message if loading failed
Diffstat (limited to 'sd/qa')
-rw-r--r-- | sd/qa/unit/filters-test.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sd/qa/unit/filters-test.cxx b/sd/qa/unit/filters-test.cxx index a1ef22c3bc90..1ae13d6c3c23 100644 --- a/sd/qa/unit/filters-test.cxx +++ b/sd/qa/unit/filters-test.cxx @@ -116,7 +116,12 @@ FileFormat aFileFormats[] = { ::sd::DrawDocShellRef xDocShRef = new ::sd::DrawDocShell(); SfxMedium* pSrcMed = new SfxMedium(rURL, STREAM_STD_READWRITE, true); pSrcMed->SetFilter(aFilter); - CPPUNIT_ASSERT_MESSAGE( "load failed", xDocShRef->DoLoad(pSrcMed) ); + if ( !xDocShRef->DoLoad(pSrcMed) ) + { + if (xDocShRef.Is()) + xDocShRef->DoClose(); + CPPUNIT_ASSERT_MESSAGE( "failed to load", false ); + } return xDocShRef; } |