From 996dd9c15470230a9ff7500b614150f05cb3808c Mon Sep 17 00:00:00 2001 From: Gerardo Tauriello <gerardo.tauriello@unibas.ch> Date: Thu, 7 Feb 2019 13:06:51 +0100 Subject: [PATCH] Fix indentation --- modules/gfx/pymod/export_scene.cc | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/modules/gfx/pymod/export_scene.cc b/modules/gfx/pymod/export_scene.cc index b810b9122..f67e90cce 100644 --- a/modules/gfx/pymod/export_scene.cc +++ b/modules/gfx/pymod/export_scene.cc @@ -268,15 +268,14 @@ void export_Scene() .add_property("hemi_params",scene_get_hemi_p,scene_set_hemi_p) ; + // we need to make sure there are no pending references to Python objects + // tied to the scene singleton. The destructor of + // scene may be called after Python is shutdown which results + // in a segfault. + scope().attr("__dict__")["atexit"]=handle<>(PyImport_ImportModule("atexit")); -// we need to make sure there are no pending references to Python objects -// tied to the scene singleton. The destructor of -// scene may be called after Python is shutdown which results -// in a segfault. -scope().attr("__dict__")["atexit"]=handle<>(PyImport_ImportModule("atexit")); - -def("_clear_scene", &clear_scene); -object r=scope().attr("_clear_scene"); -scope().attr("atexit").attr("register")(r); + def("_clear_scene", &clear_scene); + object r=scope().attr("_clear_scene"); + scope().attr("atexit").attr("register")(r); } -- GitLab