summaryrefslogtreecommitdiffstats
path: root/src/progs/ingenuity/GtkObjectController.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/progs/ingenuity/GtkObjectController.cpp')
-rw-r--r--src/progs/ingenuity/GtkObjectController.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/progs/ingenuity/GtkObjectController.cpp b/src/progs/ingenuity/GtkObjectController.cpp
index d5fb08a1..798dc1f4 100644
--- a/src/progs/ingenuity/GtkObjectController.cpp
+++ b/src/progs/ingenuity/GtkObjectController.cpp
@@ -26,6 +26,11 @@ GtkObjectController::GtkObjectController(CountedPtr<ObjectModel> model)
model->metadata_update_sig.connect(sigc::mem_fun(this, &GtkObjectController::metadata_update));
}
+GtkObjectController::~GtkObjectController()
+{
+ assert(m_model->controller() == this);
+ m_model->set_controller(NULL);
+}
} // namespace Ingenuity