tool/CommandData.cpp
changeset 1869 14f634f5b613
parent 1827 489be2180f71
child 1880 f46bec1b5f21
--- a/tool/CommandData.cpp	Thu Mar 11 14:29:43 2010 +0100
+++ b/tool/CommandData.cpp	Thu Mar 11 15:03:52 2010 +0100
@@ -66,6 +66,7 @@
 
 void CommandData::execute(const StringVector &args)
 {
+	MasterIndexList masterIndices;
     DomainList domains;
     DomainList::const_iterator di;
 
@@ -75,9 +76,10 @@
         throwInvalidUsageException(err);
     }
 
+	masterIndices = getMasterIndices();
     MasterIndexList::const_iterator mi;
-    for (mi = getMasterIndices().begin();
-            mi != getMasterIndices().end(); mi++) {
+    for (mi = masterIndices.begin();
+            mi != masterIndices.end(); mi++) {
         MasterDevice m(*mi);
         m.open(MasterDevice::Read);
         domains = selectedDomains(m);