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()) {
|
foreach(Operation * o, operations()) {
|
||||||
if (o->targets(*p))
|
if (o->targets(*p))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
CopyOperation* copyOp = dynamic_cast<CopyOperation*>(o);
|
CopyOperation* copyOp = dynamic_cast<CopyOperation*>(o);
|
||||||
const Partition* source = ©Op->sourcePartition();
|
if (copyOp) {
|
||||||
if (source == p)
|
const Partition* source = ©Op->sourcePartition();
|
||||||
return true;
|
if (source == p)
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue