tool/CommandDebug.cpp
changeset 1869 14f634f5b613
parent 1826 ec6223c3b7ec
child 1880 f46bec1b5f21
--- a/tool/CommandDebug.cpp	Thu Mar 11 14:29:43 2010 +0100
+++ b/tool/CommandDebug.cpp	Thu Mar 11 15:03:52 2010 +0100
@@ -68,6 +68,7 @@
 
 void CommandDebug::execute(const StringVector &args)
 {
+	MasterIndexList masterIndices;
     stringstream str;
     int debugLevel;
     
@@ -87,9 +88,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::ReadWrite);
         m.setDebug(debugLevel);