diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/AtomWriter.cpp | 6 | ||||
-rw-r--r-- | src/client/ClientStore.cpp | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/AtomWriter.cpp b/src/AtomWriter.cpp index 7afd6056..8b2d90c5 100644 --- a/src/AtomWriter.cpp +++ b/src/AtomWriter.cpp @@ -14,6 +14,7 @@ along with Ingen. If not, see <http://www.gnu.org/licenses/>. */ +#include <cassert> #include <string> #include "ingen/AtomSink.hpp" @@ -58,6 +59,7 @@ AtomWriter::AtomWriter(URIMap& map, URIs& uris, AtomSink& sink) void AtomWriter::finish_msg() { + assert(!_forge.stack); _sink.write((const LV2_Atom*)_out.buf); _out.len = 0; } @@ -174,6 +176,8 @@ AtomWriter::move(const Raul::Path& old_path, forge_uri(Node::path_to_uri(old_path)); lv2_atom_forge_property_head(&_forge, _uris.patch_destination, 0); forge_uri(Node::path_to_uri(new_path)); + lv2_atom_forge_pop(&_forge, &msg); + finish_msg(); } void @@ -183,6 +187,8 @@ AtomWriter::del(const Raul::URI& uri) lv2_atom_forge_blank(&_forge, &msg, next_id(), _uris.patch_Delete); lv2_atom_forge_property_head(&_forge, _uris.patch_subject, 0); forge_uri(uri); + lv2_atom_forge_pop(&_forge, &msg); + finish_msg(); } void 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<ObjectModel>(); } + SPtr<ObjectModel> object = dynamic_ptr_cast<ObjectModel>(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<ObjectModel> object = dynamic_ptr_cast<ObjectModel>(top->second); if (object) { // Notify the program this object is going away object->signal_destroyed().emit(); |