Segfault fixes. Switching scenes broke some assumptions. All PyObject calls from userspace now handle (discard) exceptions and return values.

This commit is contained in:
John McCardle 2024-03-08 12:09:09 -05:00
commit aa7f2ba605
5 changed files with 41 additions and 4 deletions

View file

@ -4,6 +4,7 @@
//Scene::Scene() { game = 0; std::cout << "WARN: default Scene constructor called. (game = " << game << ")" << std::endl;};
Scene::Scene(GameEngine* g)
{
key_callable = Py_None;
game = g;
ui_elements = std::make_shared<std::vector<std::shared_ptr<UIDrawable>>>();
}