diff -r 489ea0becd74 -r 14f634f5b613 tool/CommandAlias.cpp --- a/tool/CommandAlias.cpp Thu Mar 11 14:29:43 2010 +0100 +++ b/tool/CommandAlias.cpp Thu Mar 11 15:03:52 2010 +0100 @@ -81,6 +81,7 @@ uint16_t alias; stringstream err, strAlias; int number; + MasterIndexList masterIndices; SlaveList slaves; SlaveList::const_iterator si; @@ -99,11 +100,12 @@ } alias = number; - if (getMasterIndices().size() != 1) { + masterIndices = getMasterIndices(); + if (masterIndices.size() != 1) { err << getName() << " requires to select a single master!"; throwInvalidUsageException(err); } - MasterDevice m(getMasterIndices().front()); + MasterDevice m(masterIndices.front()); m.open(MasterDevice::ReadWrite); slaves = selectedSlaves(m);