Skip to content
Snippets Groups Projects
Commit 24b97bf9 authored by Philipp Suffa's avatar Philipp Suffa
Browse files

Fixed Callback Segfault in the python coupling

parent fdf956a2
Branches
No related merge requests found
......@@ -31,6 +31,7 @@ Matthias Markl
Michael Kuron
Nils Kohl
Paulo Carvalho
Philipp Suffa
Regina Ammer
Sagar Dolas
Sebastian Eibl
......
......@@ -87,10 +87,11 @@ namespace python_coupling {
PythonCallback::PythonCallback( const std::string & fileOrModuleName, const std::string & functionName, const std::vector<std::string> & argv )
: functionName_( functionName ), exposedVars_( new DictWrapper() ), callbackDict_( new DictWrapper() )
: functionName_( functionName )
{
Manager::instance()->triggerInitialization();
exposedVars_ = make_shared<DictWrapper>();
callbackDict_ = make_shared<DictWrapper>();
namespace py = pybind11;
// Add empty callbacks module
......@@ -102,10 +103,11 @@ namespace python_coupling {
PythonCallback::PythonCallback( const std::string & functionName )
: functionName_( functionName ), exposedVars_( new DictWrapper() ), callbackDict_( new DictWrapper() )
: functionName_( functionName )
{
Manager::instance()->triggerInitialization();
exposedVars_ = make_shared<DictWrapper>();
callbackDict_ = make_shared<DictWrapper>();
// Add empty callbacks module
py::object callbackModule = py::module::import( "walberla_cpp.callbacks");
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment