From ab0b0016c13a1bec7ea43c244cbf6e0a77ca3cc7 Mon Sep 17 00:00:00 2001
From: Mikhail Svechnikov <m.svechnikov@fz-juelich.de>
Date: Wed, 22 Feb 2023 14:26:35 +0100
Subject: [PATCH] RealItem: add assertion

---
 GUI/Model/Data/RealItem.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/GUI/Model/Data/RealItem.cpp b/GUI/Model/Data/RealItem.cpp
index 560214ddb01..823bbaab342 100644
--- a/GUI/Model/Data/RealItem.cpp
+++ b/GUI/Model/Data/RealItem.cpp
@@ -472,6 +472,7 @@ QString RealItem::readFrom(QXmlStreamReader* r, const QString& projectDir,
             // native data
         } else if (tag == Tag::NativeData) {
             // TODO: do we need to create coordinates here?
+            ASSERT(m_dataItem);
             initNativeData()->readFrom(r); // read 'm_dataItem' before
             nativeDataError = m_nativeDataItem->loadDatafield(messageService, projectDir);
             XML::gotoEndElementOfTag(r, tag);
-- 
GitLab