From 0c5622ea695e0fc9a94d8da614d05005a1e1a481 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mika=C3=ABl=20Capelle?= Date: Tue, 11 Jan 2022 22:35:35 +0100 Subject: [PATCH] Fix shared_ptr in createFile(). --- src/runner/pythonrunner.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/runner/pythonrunner.cpp b/src/runner/pythonrunner.cpp index 83dc9e7..5aefe00 100644 --- a/src/runner/pythonrunner.cpp +++ b/src/runner/pythonrunner.cpp @@ -664,7 +664,9 @@ BOOST_PYTHON_MODULE(mobase) .def("getSupportedExtensions", &IInstallationManager::getSupportedExtensions) .def("extractFile", &IInstallationManager::extractFile, (bpy::arg("entry"), bpy::arg("silent") = false)) .def("extractFiles", &IInstallationManager::extractFiles, (bpy::arg("entries"), bpy::arg("silent") = false)) - .def("createFile", &IInstallationManager::createFile, bpy::arg("entry")) + .def("createFile", +[](IInstallationManager* m, std::shared_ptr entry) { + return m->createFile(utils::clean_shared_ptr(entry)); + }, bpy::arg("entry")) // accept both QString and GuessedValue since the conversion is not automatic in Python, and // return a tuple to get back the mod name and the mod ID