aboutsummaryrefslogtreecommitdiff
path: root/src/qt
diff options
context:
space:
mode:
Diffstat (limited to 'src/qt')
-rw-r--r--src/qt/test/test_main.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qt/test/test_main.cpp b/src/qt/test/test_main.cpp
index 3e6b3a2a12..c39266a397 100644
--- a/src/qt/test/test_main.cpp
+++ b/src/qt/test/test_main.cpp
@@ -61,7 +61,7 @@ int main(int argc, char *argv[])
// platform ("xcb", "windows", or "cocoa") so tests can't unintentionally
// interfere with any background GUIs and don't require extra resources.
#if defined(WIN32)
- _putenv_s("QT_QPA_PLATFORM", "minimal");
+ if (getenv("QT_QPA_PLATFORM") == nullptr) _putenv_s("QT_QPA_PLATFORM", "minimal");
#else
setenv("QT_QPA_PLATFORM", "minimal", /* overwrite */ 0);
#endif