summaryrefslogtreecommitdiffstats
path: root/PC/python_uwp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'PC/python_uwp.cpp')
-rw-r--r--PC/python_uwp.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/PC/python_uwp.cpp b/PC/python_uwp.cpp
index 06c1dd3..2656d18 100644
--- a/PC/python_uwp.cpp
+++ b/PC/python_uwp.cpp
@@ -167,7 +167,10 @@ wmain(int argc, wchar_t **argv)
PyStatus status;
PyPreConfig preconfig;
+ preconfig.struct_size = sizeof(PyPreConfig);
+
PyConfig config;
+ config.struct_size = sizeof(PyConfig);
const wchar_t *moduleName = NULL;
const wchar_t *p = wcsrchr(argv[0], L'\\');
@@ -186,7 +189,10 @@ wmain(int argc, wchar_t **argv)
}
}
- PyPreConfig_InitPythonConfig(&preconfig);
+ status = PyPreConfig_InitPythonConfig(&preconfig);
+ if (PyStatus_Exception(status)) {
+ goto fail_without_config;
+ }
if (!moduleName) {
status = Py_PreInitializeFromArgs(&preconfig, argc, argv);
if (PyStatus_Exception(status)) {