Join the thread only if launch succeeded.

Change-Id: Idee779cea587e11f6d0f7902182c9394e73d46eb
Reviewed-on: https://gerrit.libreoffice.org/60488
Tested-by: Jenkins
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
(cherry picked from commit 6b12e4a9be9283951ac234692e79c9e00cd32654)
Reviewed-on: https://gerrit.libreoffice.org/60501
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
diff --git a/sax/source/fastparser/fastparser.cxx b/sax/source/fastparser/fastparser.cxx
index 5655d71..548d54f 100644
--- a/sax/source/fastparser/fastparser.cxx
+++ b/sax/source/fastparser/fastparser.cxx
@@ -801,8 +801,8 @@ void FastSaxParserImpl::parseStream(const InputSource& rStructSource)
    {
        rtl::Reference<ParserThread> xParser;
        xParser = new ParserThread(this);
        aEnsureFree.setThread(xParser);
        xParser->launch();
        aEnsureFree.setThread(xParser);
        bool done = false;
        do {
            rEntity.maConsumeResume.wait();