tool/CommandCStruct.cpp
changeset 1869 14f634f5b613
parent 1827 489be2180f71
child 1879 7539329b5cf6
--- a/tool/CommandCStruct.cpp	Thu Mar 11 14:29:43 2010 +0100
+++ b/tool/CommandCStruct.cpp	Thu Mar 11 15:03:52 2010 +0100
@@ -70,6 +70,7 @@
 
 void CommandCStruct::execute(const StringVector &args)
 {
+	MasterIndexList masterIndices;
     SlaveList slaves;
     SlaveList::const_iterator si;
 
@@ -79,9 +80,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);
         slaves = selectedSlaves(m);