Resolves: fdo#81635 crash after 3rd call to ApplicationScriptLibraryContainercp-4.3-branch-point
commit789d346675f788ce3bfd091bcc96b2ff7ca588de
authorCaolán McNamara <caolanm@redhat.com>
Mon, 15 Sep 2014 13:58:32 +0000 (15 14:58 +0100)
committerStephan Bergmann <sbergman@redhat.com>
Mon, 15 Sep 2014 14:23:25 +0000 (15 14:23 +0000)
tree2c15379908b088c148553b2e097563834da99d96
parent64a89bee8c3bd74d789f50256d2528d9b5f4f736
Resolves: fdo#81635 crash after 3rd call to ApplicationScriptLibraryContainer

in PackageImpl::processPackage_

xComponentContext->getServiceManager()->createInstanceWithContext(
                    "com.sun.star.script.ApplicationScriptLibraryContainer"

does not increment the refcount, so on leaving the method the refcount
is decremented by 1, because on the first enter the refcount happens to
be three, then if the extension has more than 3 items in it the refcount
hits 0 here and falls over

some of fdo#79301, fdo#70607, fdo#66706 might be dups of this

regression from 306efefe22e02248eff14f8be2cef68d75d26e55 I believe

(cherry picked from commit 9128507579246b1559b0bc195d7e9f89541cbbbf)

Conflicts:
sfx2/source/appl/appbaslib.cxx

Change-Id: I3da50693fe656b68c5555b641d9b32246c8fc208
Reviewed-on: https://gerrit.libreoffice.org/11457
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
sfx2/source/appl/appbaslib.cxx