diff --git a/GUI/Model/Sample/CompoundItem.cpp b/GUI/Model/Sample/CompoundItem.cpp
index da27f3f98febb111eefe10ebf13a920c538e269d..064e50ee10e036cc966195df91e3ced7079a90c0 100644
--- a/GUI/Model/Sample/CompoundItem.cpp
+++ b/GUI/Model/Sample/CompoundItem.cpp
@@ -44,11 +44,9 @@ const QString position_tooltip = "Relative position of the particle's reference
 } // namespace
 
 
-CompoundItem::CompoundItem(const MaterialsSet* materials)
+CompoundItem::CompoundItem(const MaterialsSet*)
     : ItemWithParticles(abundance_tooltip, position_tooltip)
-    , m_materials(materials)
 {
-    ASSERT(m_materials);
 }
 
 void CompoundItem::addItemWithParticleSelection(ItemWithParticles* particle)
@@ -87,7 +85,8 @@ void CompoundItem::readFrom(QXmlStreamReader* r)
         if (tag == Tag::BaseData)
             XML::readBaseElement<ItemWithParticles>(r, tag, this);
         else if (tag == Tag::Particle) {
-            m_particles.push_back(PolyItem<ParticlesCatalog>().readItemFrom(r, m_materials));
+            MaterialsSet* dummy = nullptr;
+            m_particles.push_back(PolyItem<ParticlesCatalog>().readItemFrom(r, dummy)); // TODO
             XML::gotoEndElementOfTag(r, tag);
         } else if (tag == Tag::ExpandCompoundGroupbox)
             expandCompound = XML::readTaggedBool(r, tag);
diff --git a/GUI/Model/Sample/CompoundItem.h b/GUI/Model/Sample/CompoundItem.h
index a14edcff50c8d0dffb32ec2cc1fe508d8fb4cec6..35444933c8e594c3cd78f64212ffe3d6d1acf1ef 100644
--- a/GUI/Model/Sample/CompoundItem.h
+++ b/GUI/Model/Sample/CompoundItem.h
@@ -41,7 +41,6 @@ public:
 
 private:
     OwningVector<ItemWithParticles> m_particles;
-    const MaterialsSet* m_materials;
 };
 
 #endif // BORNAGAIN_GUI_MODEL_SAMPLE_COMPOUNDITEM_H