diff --git a/SpeckleConnector/Connector/Interface/Browser/Bridge/Send/GetSendFilters.cpp b/SpeckleConnector/Connector/Interface/Browser/Bridge/Send/GetSendFilters.cpp index 26bf6d6..8ec9121 100644 --- a/SpeckleConnector/Connector/Interface/Browser/Bridge/Send/GetSendFilters.cpp +++ b/SpeckleConnector/Connector/Interface/Browser/Bridge/Send/GetSendFilters.cpp @@ -34,8 +34,8 @@ GetSendFilters::GetSendFilters() : BridgeMethod{"GetSendFilters", [&]() { return: The send filters --------------------------------------------------------------------*/ std::unique_ptr GetSendFilters::run() const { - Vector filters; + auto filters = std::make_unique>(); //filters.emplace_back(ArchicadEverythingFilter{}); //TODO: Implement as required - filters.emplace_back(ArchicadSelectionFilter{}); - return std::make_unique(filters); + filters->emplace_back(ArchicadSelectionFilter{}); + return std::make_unique(std::move(filters)); } //GetSendFilters::run diff --git a/SpeckleLib/Speckle/Database/Storage/DocumentStore/DocumentStoreCore.cpp b/SpeckleLib/Speckle/Database/Storage/DocumentStore/DocumentStoreCore.cpp index 11b81ac..c12d603 100644 --- a/SpeckleLib/Speckle/Database/Storage/DocumentStore/DocumentStoreCore.cpp +++ b/SpeckleLib/Speckle/Database/Storage/DocumentStore/DocumentStoreCore.cpp @@ -94,7 +94,8 @@ namespace { void copyHandleToMemory(const GSHandle& handle, active::utility::Memory& memory) { auto storeSize = BMGetHandleSize(handle); memory.resize(storeSize); - active::utility::Memory::copy(memory.data(), *handle, storeSize, storeSize); + if ((storeSize > 0) && (*handle != nullptr)) + active::utility::Memory::copy(memory.data(), *handle, storeSize, storeSize); } //copyHandleToMemory #endif diff --git a/SpeckleLib/Speckle/Database/Storage/DocumentStore/DocumentStoreEngine.h b/SpeckleLib/Speckle/Database/Storage/DocumentStore/DocumentStoreEngine.h index d911977..e303953 100644 --- a/SpeckleLib/Speckle/Database/Storage/DocumentStore/DocumentStoreEngine.h +++ b/SpeckleLib/Speckle/Database/Storage/DocumentStore/DocumentStoreEngine.h @@ -162,7 +162,7 @@ namespace speckle::database { return m_cache.get(); //Return an empty container if there's no data //Import the document data into the record cache if constexpr (std::is_same_v) - Transport().receive(std::forward(*m_cache), active::serialise::Identity{}, storedData); + Transport().receive(std:: forward(*m_cache), active::serialise::Identity{}, storedData); else Transport().receive(ObjWrapper{*m_cache}, active::serialise::Identity{}, storedData); return m_cache.get();