Fix null pointer dereference.
This commit is contained in:
parent
349b59574f
commit
da550fb534
|
@ -460,10 +460,13 @@ bool OperationStack::contains(const Partition* p) const
|
|||
foreach(Operation * o, operations()) {
|
||||
if (o->targets(*p))
|
||||
return true;
|
||||
|
||||
CopyOperation* copyOp = dynamic_cast<CopyOperation*>(o);
|
||||
const Partition* source = ©Op->sourcePartition();
|
||||
if (source == p)
|
||||
return true;
|
||||
if (copyOp) {
|
||||
const Partition* source = ©Op->sourcePartition();
|
||||
if (source == p)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue