diff -r 489ea0becd74 -r 14f634f5b613 tool/CommandFoeWrite.cpp --- a/tool/CommandFoeWrite.cpp Thu Mar 11 14:29:43 2010 +0100 +++ b/tool/CommandFoeWrite.cpp Thu Mar 11 15:03:52 2010 +0100 @@ -82,6 +82,7 @@ void CommandFoeWrite::execute(const StringVector &args) { + MasterIndexList masterIndices; stringstream err; ec_ioctl_slave_foe_t data; ifstream file; @@ -93,11 +94,12 @@ throwInvalidUsageException(err); } - 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()); if (args[0] == "-") { loadFoeData(&data, cin);