summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--common/domain/applicationdomaintype.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/common/domain/applicationdomaintype.h b/common/domain/applicationdomaintype.h
index a581068..ad2d7a1 100644
--- a/common/domain/applicationdomaintype.h
+++ b/common/domain/applicationdomaintype.h
@@ -73,7 +73,8 @@ public:
73 { 73 {
74 //TODO only copy requested properties 74 //TODO only copy requested properties
75 auto memoryAdaptor = QSharedPointer<Akonadi2::ApplicationDomain::MemoryBufferAdaptor>::create(*(domainType.mAdaptor)); 75 auto memoryAdaptor = QSharedPointer<Akonadi2::ApplicationDomain::MemoryBufferAdaptor>::create(*(domainType.mAdaptor));
76 return QSharedPointer<DomainType>::create(domainType.mResourceInstanceIdentifier, domainType.mIdentifier, domainType.mRevision, memoryAdaptor); 76 //The identifier still internal refers to the memory-mapped pointer, we need to copy the memory or it will become invalid
77 return QSharedPointer<DomainType>::create(domainType.mResourceInstanceIdentifier, QByteArray(domainType.mIdentifier.constData()), domainType.mRevision, memoryAdaptor);
77 } 78 }
78 79
79 virtual ~ApplicationDomainType() {} 80 virtual ~ApplicationDomainType() {}