From 471c9e43493ab1d3a83ed6a8ca53bd818a2ed275 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 16 Jun 2006 23:17:46 +0000 Subject: More thorough assertion checking in CountedPtr; Adding plugins to subpatches working. git-svn-id: http://svn.drobilla.net/lad/grauph@46 a436a847-0d15-0410-975c-d299462d15a1 --- src/progs/gtk/PatchController.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/progs') diff --git a/src/progs/gtk/PatchController.cpp b/src/progs/gtk/PatchController.cpp index 20dcc096..1caf1e8c 100644 --- a/src/progs/gtk/PatchController.cpp +++ b/src/progs/gtk/PatchController.cpp @@ -63,6 +63,7 @@ PatchController::PatchController(CountedPtr model) { assert(model->path().length() > 0); assert(model->controller() == this); // NodeController() does this + assert(m_patch_model == model); /* FIXME if (model->path() != "/") { PatchController* parent = Store::instance().patch(model->path().parent()); @@ -412,8 +413,8 @@ void PatchController::add_node(CountedPtr object) { assert(object); - assert(object->parent() == m_patch_model); assert(object->path().parent() == m_patch_model->path()); + assert(object->parent() == m_patch_model); /*if (patch_model()->get_node(nm->name()) != NULL) { cerr << "Ignoring existing\n"; @@ -423,6 +424,7 @@ PatchController::add_node(CountedPtr object) CountedPtr node(object); + assert(node == object); if (node) { assert(node->parent() == m_patch_model); @@ -430,6 +432,7 @@ PatchController::add_node(CountedPtr object) CountedPtr patch(node); if (patch) { + assert(patch == node == object); assert(patch->parent() == m_patch_model); nc = new PatchController(patch); } else { -- cgit v1.2.1