16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-22 17:29:18 +02:00

Final fix for missing getCommands function inside abstractscreenrenderer

This commit is contained in:
2025-01-09 16:07:57 +01:00
parent ab227afedb
commit 4923ee4009

View File

@@ -108,9 +108,11 @@ void render_task::run() {
// get commands from renderer // get commands from renderer
auto *commandsPO = PyObject_CallMethod(m_renderer, "getCommands", nullptr); auto *commandsPO = PyObject_CallMethod(m_renderer, "getCommands", nullptr);
if (commandsPO != nullptr)
{
std::vector<std::string> commands = python_external_utils::PyObjectToStringArray(commandsPO); std::vector<std::string> commands = python_external_utils::PyObjectToStringArray(commandsPO);
Py_DECREF(commandsPO);
Py_DECREF(commandsPO);
// we perform any actions ONLY when there are any commands in buffer // we perform any actions ONLY when there are any commands in buffer
if (!commands.empty()) if (!commands.empty())
{ {
@@ -130,6 +132,10 @@ void render_task::run() {
} }
} }
}
} }