diff options
| author | David Lönnhager <david.l@mullvad.net> | 2022-05-18 16:13:57 +0200 |
|---|---|---|
| committer | David Lönnhager <david.l@mullvad.net> | 2022-05-18 16:13:57 +0200 |
| commit | 0211a43e2f9e1b7beccaefd9a2a09672f1877fd8 (patch) | |
| tree | 02257be2e0378a3ad9887a4074ed358b2041a068 /windows/nsis-plugins/src/log/log.cpp | |
| parent | ddb40d6479ad88a58ea3856e24e6038286dc7382 (diff) | |
| parent | b66f9ae5f7c77e945aeab77ce03d354c0cc3b298 (diff) | |
| download | mullvadvpn-0211a43e2f9e1b7beccaefd9a2a09672f1877fd8.tar.xz mullvadvpn-0211a43e2f9e1b7beccaefd9a2a09672f1877fd8.zip | |
Merge branch 'win-remove-temp-setup-files'
Diffstat (limited to 'windows/nsis-plugins/src/log/log.cpp')
| -rw-r--r-- | windows/nsis-plugins/src/log/log.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/windows/nsis-plugins/src/log/log.cpp b/windows/nsis-plugins/src/log/log.cpp index a491dc9b2d..6940240137 100644 --- a/windows/nsis-plugins/src/log/log.cpp +++ b/windows/nsis-plugins/src/log/log.cpp @@ -19,6 +19,8 @@ Logger *g_logger = nullptr; namespace { +bool g_pinned = false; + std::wstring PopString() { // @@ -45,6 +47,11 @@ EXTERN_C IMAGE_DOS_HEADER __ImageBase; void PinDll() { + if (g_pinned) + { + return; + } + // // Apparently NSIS loads and unloads the plugin module for EVERY call it makes to the plugin. // This makes it kind of difficult to maintain state. @@ -68,6 +75,8 @@ void PinDll() { LoadLibraryW(self); } + + g_pinned = true; } std::vector<std::wstring> BlockToRows(const std::wstring &textBlock) |
