summaryrefslogtreecommitdiffstats
path: root/src/progs/ingenuity/NodeController.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/progs/ingenuity/NodeController.cpp')
-rw-r--r--src/progs/ingenuity/NodeController.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/progs/ingenuity/NodeController.cpp b/src/progs/ingenuity/NodeController.cpp
index 641d975e..950f70c9 100644
--- a/src/progs/ingenuity/NodeController.cpp
+++ b/src/progs/ingenuity/NodeController.cpp
@@ -104,8 +104,10 @@ void
NodeController::destroy()
{
cerr << "FIXME: NODE DESTROYED\n";
- destroy_module(); // cuts reference
- //delete this;
+ destroy_module();
+ CountedPtr<ObjectModel> model = m_model;
+ m_model->controller().reset();
+ m_model.reset();
}