After you call erase, you can't use that iterator any more because it's invalid.
There are many possible fixes (not tested, but at least resembling a possible solution) :
vector<Module *>::iterator x = modules.begin();while(x != modules.end()){ rVal &= (*x)->Destroy(); delete (*x); x = modules.erase(x);}
vector<bool> Result;transform(modules.begin(), modules.end(), back_inserter<bool>(Result), mem_fun<bool, Module *>(&Module::Destroy));for_each(modules.begin(), modules.end(), mem_fun<void, Module *>(&Module::operator delete));return find(Result.begin(), Result.end(), false) == Result.end();
And I'm sure many other ways. Since it's a vector, though, I'd suggest skipping the solutions that erase one element at a time as that will likely cause tons of extra and entirely unneccessary work to take place. kratolp's solution is probably one of the best, but if you're often deleting and/or adding elements to random places in the vector, you might want to consider using a different data structre such as list or set.
"Walk not the trodden path, for it has borne it's burden." -John, Flying Monk