From d05d7e4267eca39d8d54fb0d199a450b364b77c3 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 31 Dec 2013 05:47:26 +0000 Subject: Fix crash on bulk deletion and AtomWriter forge errors. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5240 a436a847-0d15-0410-975c-d299462d15a1 --- src/client/ClientStore.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/client') diff --git a/src/client/ClientStore.cpp b/src/client/ClientStore.cpp index 9882d2d5..56c74cd8 100644 --- a/src/client/ClientStore.cpp +++ b/src/client/ClientStore.cpp @@ -105,12 +105,13 @@ ClientStore::remove_object(const Raul::Path& path) return SPtr(); } + SPtr object = dynamic_ptr_cast(top->second); + // Remove the object and all its descendants Objects removed; remove(top, removed); // Notify everything that needs to know this object is going away - SPtr object = dynamic_ptr_cast(top->second); if (object) { // Notify the program this object is going away object->signal_destroyed().emit(); -- cgit v1.2.1