summaryrefslogtreecommitdiffstats
path: root/logic/lists/InstanceList.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'logic/lists/InstanceList.cpp')
-rw-r--r--logic/lists/InstanceList.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/logic/lists/InstanceList.cpp b/logic/lists/InstanceList.cpp
index 200b02df..72748b5f 100644
--- a/logic/lists/InstanceList.cpp
+++ b/logic/lists/InstanceList.cpp
@@ -364,6 +364,11 @@ int InstanceList::add(InstancePtr t)
InstancePtr InstanceList::getInstanceById(QString instId) const
{
+ if (m_instances.isEmpty())
+ {
+ return InstancePtr();
+ }
+
QListIterator<InstancePtr> iter(m_instances);
InstancePtr inst;
while (iter.hasNext())