- attempt to fix a segfault in grouped units

This commit is contained in:
Mark Vejvoda
2011-09-09 20:30:13 +00:00
parent 01d1f38a82
commit 15cad68faf

View File

@@ -50,16 +50,16 @@ bool CommandGroupSorter::compare(const CommandGroupSorter *l, const CommandGroup
bool CommandGroupSorter::operator< (const CommandGroupSorter &j) const { bool CommandGroupSorter::operator< (const CommandGroupSorter &j) const {
bool result = false; bool result = false;
// If comparer if null or dead // If comparer if null or dead
// if(j.unit == NULL || j.unit->isAlive() == false) { if(j.unit == NULL || j.unit->isAlive() == false) {
// // if source is null or dead also // if source is null or dead also
// if((this->unit == NULL || this->unit->isAlive() == false)) { if((this->unit == NULL || this->unit->isAlive() == false)) {
// return false; return false;
// } }
// return true; return true;
// } }
// else if((this->unit == NULL || this->unit->isAlive() == false)) { else if((this->unit == NULL || this->unit->isAlive() == false)) {
// return false; return false;
// } }
Command *command= this->unit->getCurrrentCommandThreadSafe(); Command *command= this->unit->getCurrrentCommandThreadSafe();
Command *commandPeer = j.unit->getCurrrentCommandThreadSafe(); Command *commandPeer = j.unit->getCurrrentCommandThreadSafe();