diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-12-08 17:32:13 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2015-12-08 22:07:10 +0000 |
commit | 448fec81bf45e0e74be887d139519a3c403c625e (patch) | |
tree | 478ca466528de8bbd06d84fe1c4d6af6482546ba /extensions/source/plugin/win/sysplug.cxx | |
parent | 819f33e67cfdfea8358bce3f80230bced72696a6 (diff) |
tdf#62381: Stop using NPAPI plugin when NP_Initialize fails
(...in the Windows-specific code path)
Change-Id: I5984ecd88a12d3f22aecaa685bd552f4235fb13d
(cherry picked from commit 00daa67d745ae84ed15d3f210001193c6e950144)
Reviewed-on: https://gerrit.libreoffice.org/20474
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'extensions/source/plugin/win/sysplug.cxx')
-rw-r--r-- | extensions/source/plugin/win/sysplug.cxx | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/extensions/source/plugin/win/sysplug.cxx b/extensions/source/plugin/win/sysplug.cxx index d34c80012295..eb14ec05be88 100644 --- a/extensions/source/plugin/win/sysplug.cxx +++ b/extensions/source/plugin/win/sysplug.cxx @@ -98,12 +98,20 @@ PluginComm_Impl::PluginComm_Impl( const OUString& /*rMIME*/, const OUString& rNa "### version failure!" ); m_eCall = eNP_Initialize; - execute(); + if (execute() != NPERR_NO_ERROR) { + shutdown(); + throw CannotInitializeException(); + } } PluginComm_Impl::~PluginComm_Impl() { + shutdown(); +} + +void PluginComm_Impl::shutdown() +{ if (_plDLL) { // NPP_Shutdown(); |